diff options
| author | Luc Morin | 2013-06-04 20:12:31 +0100 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-06-04 20:16:07 +0100 | 
| commit | 303c7f916628ced3e09355f8f8504c16eadc10e1 (patch) | |
| tree | 2f053b79dfb8a8e3a101adb815d64e7fccbdb401 /src/ng/directive/input.js | |
| parent | a95bfbeac084a1aad9e296d24e0c78c353368235 (diff) | |
| download | angular.js-303c7f916628ced3e09355f8f8504c16eadc10e1.tar.bz2 | |
docs(input): provide explanation of how ngModel will affect the local scope
Diffstat (limited to 'src/ng/directive/input.js')
| -rw-r--r-- | src/ng/directive/input.js | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 610396a5..fd301c6a 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -1087,7 +1087,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: @@ -1098,6 +1098,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:   * | 
