docs(input): provide explanation of how ngModel will affect the local scope

This commit is contained in:
Luc Morin 2013-06-04 20:12:31 +01:00 committed by Pete Bacon Darwin
parent a95bfbeac0
commit 303c7f9166

View file

@ -1087,7 +1087,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* @element input * @element input
* *
* @description * @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. * `select`, `textarea`. You can easily write your own directives to use `ngModel` as well.
* *
* `ngModel` is responsible for: * `ngModel` is responsible for:
@ -1099,6 +1099,10 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`), * - 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}. * - 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: * For basic examples, how to use `ngModel`, see:
* *
* - {@link ng.directive:input input} * - {@link ng.directive:input input}