-
Notifications
You must be signed in to change notification settings - Fork 27.5k
docs: update and improve docs for input, ngModelController, and guide/forms #9620
Conversation
- `ng-valid-[key]`: for each valid key added by `$setValidity` | ||
- `ng-invalid-[key]`: for each invalid key added by `$setValidity` | ||
- `ng-pristine`: the control hasn't been changed yet | ||
- `ng-dirty`: the control has been changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be slightly misleading (i.e. giving the impresssion that if the original value is restored, the control wouldn't be $dirty
). Maybe "has been interacted with" ?
(Just a thought - not even sure it makes it more clear.)
@Narretz: |
|
||
In the following example we create two directives. | ||
Additionally, there is the `$asyncValidators` object which handles asynchronous validation, such as making an `$http` request to the backend. Functions added to the object must return a promise that must be `resolved` when valid or rejected when `invalid`. In-progress async validations are added to `ngModelController.$pending`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rejected when invalid
<-- probably meant rejected
when invalid
+1 @Narretz for a much needed docs update ! |
I read half-way through the changes and they look good. Feel free to merge when you think you are done with edits. |
9da049f
to
bea7406
Compare
Just merged it in. Thanks @gkalpak, @Blesh and @IgorMinar |
In this PR:
Feeback welcome, I probably have introduced typos and odd wordings.