How to reset $dirty in form
What you are looking for is $setPristine(). You’ll find it in the docs here: http://docs.angularjs.org/api/ng/type/form.FormController When a form first loads on the page it is in a state called pristine. You’ll find that form.$pristine is true and form.$dirty is false. Once any changes have been made to any element that has an Angular binding, those … Read more