docs(form): clarify what $setPristine does
This commit is contained in:
@@ -252,9 +252,11 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
|
||||
* @description
|
||||
* 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.
|
||||
* This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes
|
||||
* the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`
|
||||
* state to false.
|
||||
*
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user