mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-12 08:53:10 +00:00
docs(ngChange): clarify difference between ng-change DOM change event
The ng-change event triggers immediately, which makes a difference for text input fields and text areas, where the JavaScript onchange event would only be called at the end of the change. Closes #5640
This commit is contained in:
parent
2262ca6697
commit
5adea0ba64
1 changed files with 4 additions and 1 deletions
|
|
@ -1188,7 +1188,10 @@ var ngModelDirective = function() {
|
||||||
* @name ng.directive:ngChange
|
* @name ng.directive:ngChange
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Evaluate given expression when user changes the input.
|
* Evaluate the given expression when the user changes the input.
|
||||||
|
* The expression is evaluated immediately, unlike the JavaScript onchange event
|
||||||
|
* which only triggers at the end of a change (usually, when the user leaves the
|
||||||
|
* form element or presses the return key).
|
||||||
* The expression is not evaluated when the value change is coming from the model.
|
* The expression is not evaluated when the value change is coming from the model.
|
||||||
*
|
*
|
||||||
* Note, this directive requires `ngModel` to be present.
|
* Note, this directive requires `ngModel` to be present.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue