aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Winnebeck2014-01-09 11:30:31 -0500
committerPawel Kozlowski2014-02-28 20:09:30 +0100
commit0c8a88ba092a251ba8d79092c590f45a6cd27de9 (patch)
tree2a13f29f70116ff22e2c04715b44dc046334247c
parent6b5baaddb0ec9369a55bf9c608fda9adcccc8e92 (diff)
downloadangular.js-0c8a88ba092a251ba8d79092c590f45a6cd27de9.tar.bz2
docs(input): update $parsers NgModelController doc
Make it clear that the result of the $parsers pipeline is what goes to the model value. Closes #5708
-rw-r--r--src/ng/directive/input.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index f584eda4..b9a23c8b 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -878,8 +878,9 @@ var VALID_CLASS = 'ng-valid',
* @property {*} $modelValue The value in the model, that the control is bound to.
* @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
the control reads value from the DOM. Each function is called, in turn, passing the value
- through to the next. Used to sanitize / convert the value as well as validation.
- For validation, the parsers should update the validity state using
+ through to the next. The last return value is used to populate the model.
+ Used to sanitize / convert the value as well as validation. For validation,
+ the parsers should update the validity state using
{@link ngModel.NgModelController#$setValidity $setValidity()},
and return `undefined` for invalid values.