A
A
Alexey Pavlov2014-06-30 16:32:35
Angular
Alexey Pavlov, 2014-06-30 16:32:35

AngularJs. How can I remove the ng-dirty class from an empty input without creating my own directive?

How can I remove the ng-dirty class from an empty input without resorting to creating my own directive? Ideally, you need to change the rules for adding validation classes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Moskalev, 2014-07-10
@joseperez

You can use the $setPristine() method;
https://docs.angularjs.org/api/ng/type/form.FormCo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question