It will always hold up.
They are exactly as you would expect.
$pristine is when the form hasn't been modified by the user
$dirty is when the form has been modified by the user
The distinction, as far as I can tell, is not found in $pristine and
$dirty, but rather their associated css classes .ng-pristine and .ng-dirty.
By having the distinction it allows us to have different css styling on
your input elements, based on the current state of that particular input
element.
eg:
/* grey border for pristine input elements */
input.ng-pristine {
border: 1px solid #cccccc;
}
/* orange border for dirty input elements */
input.ng-dirty {
border: 1px solid #ff3300;
}
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.