mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs(input): provide explanation of how ngModel will affect the local scope
This commit is contained in:
parent
8dd23ad2f2
commit
bc76e7255b
1 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue