form.FormController.$setPristine()

$setPristine();

Sets the form to its pristine state.

This method can be called to remove the 'ng-dirty' class and set the form to its pristine state (ng-pristine class). This method will also propagate to all the controls contained in this form.

Setting a form back to a pristine state is often useful when we want to 'reuse' a form after saving or resetting it.

doc_AngularJS
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.