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:
Bernhard Hofmann
2014-06-17 09:13:56 +01:00
committed by Peter Bacon Darwin
parent 2e0a4e385c
commit 4152155c25

View File

@@ -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.
*