aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Morin2013-06-04 20:12:31 +0100
committerPete Bacon Darwin2013-06-04 20:16:37 +0100
commitbc76e7255b7b8e9f735bb23bf6d3a9814da268fe (patch)
tree859f602811c63f68fa31e677ba9d042df4f190c2
parent8dd23ad2f2cc0223f08eb8a21aad10f5e7a3f6fb (diff)
downloadangular.js-bc76e7255b7b8e9f735bb23bf6d3a9814da268fe.tar.bz2
docs(input): provide explanation of how ngModel will affect the local scope
-rw-r--r--src/ng/directive/input.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index b892e8c9..fd4ba746 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -1051,7 +1051,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* @element input
*
* @description
- * Is directive that tells Angular to do two-way data binding. It works together with `input`,
+ * Is a directive that tells Angular to do two-way data binding. It works together with `input`,
* `select`, `textarea`. You can easily write your own directives to use `ngModel` as well.
*
* `ngModel` is responsible for:
@@ -1062,6 +1062,10 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
* - register the control with parent {@link ng.directive:form form}.
+ *
+ * Note: `ngModel` will try to bind to the property given by evaluating the expression on the
+ * current scope. If the property doesn't already exist on this scope, it will be created
+ * implicitly and added to the scope.
*
* For basic examples, how to use `ngModel`, see:
*