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

Commit e290aa8

Browse files
committed
docs(ngModel): clarify docs for NgModelController#
Closes #3498
1 parent 9c51d50 commit e290aa8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ng/directive/input.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ var VALID_CLASS = 'ng-valid',
825825
* Note that you cannot use `NgModelController` in a directive with an isolated scope,
826826
* as, in that case, the `ng-model` value gets put into the isolated scope and does not get
827827
* propogated to the parent scope.
828-
*
828+
*
829829
*
830830
* This example shows how to use `NgModelController` with a custom control to achieve
831831
* data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
@@ -1005,8 +1005,10 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
10051005
* For example {@link ng.directive:input input} or
10061006
* {@link ng.directive:select select} directives call it.
10071007
*
1008-
* It internally calls all `parsers` and if resulted value is valid, updates the model and
1009-
* calls all registered change listeners.
1008+
* It internally calls all `parsers` (including validators) and updates the `$modelValue` and the actual model path.
1009+
* Lastly it calls all registered change listeners.
1010+
*
1011+
* If validators determine the value is invalid, the `$modelValue` and the model path will be set to `undefined`.
10101012
*
10111013
* @param {string} value Value from the view.
10121014
*/

0 commit comments

Comments
 (0)