mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-03 17:15:37 +08:00
docs(ngChange) might not evaluate due to ngPattern
When a pattern is defined for an input field, ngChange is not evaluated if the input doesn't match the pattern. Only changes to or from matching patterns evaluate the ngChange expression. See #7866
This commit is contained in:
committed by
Peter Bacon Darwin
parent
2e0a4e385c
commit
4152155c25
@@ -2201,7 +2201,9 @@ var ngModelDirective = function() {
|
||||
* 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
|
||||
* or when the input does not match the pattern defined for the input in ngPattern.
|
||||
*
|
||||
*
|
||||
* Note, this directive requires `ngModel` to be present.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user