Thank God for new angular versions. but for those like me, that still have to maintain old angular js code you have to write some doggy code like this.
$scope.[moduleName] = { [variableName]: '' };
$scope.[formName].[variableName].$touched = false;
$scope.[formName].[variableName].$$untouched= false;
you can also write a function to handle lots of input elements like this. but it used jquery and bootstrap 3
HTML
<ng-form class="form" name="formName" novalidate>
<div class="row">
<div class="col-md-6"">
<div class="form-group">
<label class="control-label">
input1 <span class="symbol required"></span>
</label>
<select id="input1" name="input1" class="form-control" required ng-model="model.input1">
<option value="">Select Optionn</option>
<option ng-repeat="option in options" value="{{option.id}}">{{option.Description}}</option>
</select>
</div>
</div>
</div>
</ng-form>
Controller.js
$scope.resetForm = function () {
$scope.model = { input1: '' }; // reset form value
let form = $(".form"),
frmElm = $scope.formName; // referees to name="" for ng-form element
form.find('.form-control').each(function (item) {
let element = $(this),
id = element.attr("id");
if (frmElm[id]) {
var scopeElement = frmElm[id];
scopeElement.$touched = false;
scopeElement.$untouched = false;
}
})
};