Skip to content

Commit 0c8a88b

Browse files
gilliuspkozlowski-opensource
authored andcommitted
docs(input): update $parsers NgModelController doc
Make it clear that the result of the $parsers pipeline is what goes to the model value. Closes angular#5708
1 parent 6b5baad commit 0c8a88b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/directive/input.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,9 @@ var VALID_CLASS = 'ng-valid',
878878
* @property {*} $modelValue The value in the model, that the control is bound to.
879879
* @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
880880
the control reads value from the DOM. Each function is called, in turn, passing the value
881-
through to the next. Used to sanitize / convert the value as well as validation.
882-
For validation, the parsers should update the validity state using
881+
through to the next. The last return value is used to populate the model.
882+
Used to sanitize / convert the value as well as validation. For validation,
883+
the parsers should update the validity state using
883884
{@link ngModel.NgModelController#$setValidity $setValidity()},
884885
and return `undefined` for invalid values.
885886

0 commit comments

Comments
 (0)