Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4152155

Browse files
bernhard-hofmannpetebacondarwin
authored andcommitted
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
1 parent 2e0a4e3 commit 4152155

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ng/directive/input.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,9 @@ var ngModelDirective = function() {
22012201
* The expression is evaluated immediately, unlike the JavaScript onchange event
22022202
* which only triggers at the end of a change (usually, when the user leaves the
22032203
* form element or presses the return key).
2204-
* The expression is not evaluated when the value change is coming from the model.
2204+
* The expression is not evaluated when the value change is coming from the model
2205+
* or when the input does not match the pattern defined for the input in ngPattern.
2206+
*
22052207
*
22062208
* Note, this directive requires `ngModel` to be present.
22072209
*

0 commit comments

Comments
 (0)