Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(ngModel): grammar, clarity #4291

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/ng/directive/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,18 +1145,17 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* @element input
*
* @description
* Is a directive that tells Angular to do two-way data binding. It works together with `input`,
* `select`, `textarea` and even custom form controls that use {@link ng.directive:ngModel.NgModelController
* NgModelController} exposed by this directive.
* The `ngModel` directive binds an `input`,`select`, `textarea` or custom form control to an
* {@link ng.directive:ngModel.NgModelController NgModelController} exposed by this directive.
*
* `ngModel` is responsible for:
*
* - binding the view into the model, which other directives such as `input`, `textarea` or `select`
* require,
* - providing validation behavior (i.e. required, number, email, url),
* - 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}.
* - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
* require.
* - Providing validation behavior (i.e. required, number, email, url).
* - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).
* - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`).
* - Registering the control with its 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
Expand Down