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

Commit 90ff8a9

Browse files
jdavisp3petebacondarwin
authored andcommitted
docs(ngModel): fix grammar and improve clarity
Closes #4291 Conflicts: src/ng/directive/input.js
1 parent a4dc21e commit 90ff8a9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/ng/directive/input.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -1110,17 +1110,18 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
11101110
* @element input
11111111
*
11121112
* @description
1113-
* Is a directive that tells Angular to do two-way data binding. It works together with `input`,
1114-
* `select`, `textarea`. You can easily write your own directives to use `ngModel` as well.
1113+
* The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a
1114+
* property on the scope using {@link ng.directive:ngModel.NgModelController NgModelController},
1115+
* which is created and exposed by this directive.
11151116
*
11161117
* `ngModel` is responsible for:
11171118
*
1118-
* - binding the view into the model, which other directives such as `input`, `textarea` or `select`
1119-
* require,
1120-
* - providing validation behavior (i.e. required, number, email, url),
1121-
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
1122-
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
1123-
* - register the control with parent {@link ng.directive:form form}.
1119+
* - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
1120+
* require.
1121+
* - Providing validation behavior (i.e. required, number, email, url).
1122+
* - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).
1123+
* - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`).
1124+
* - Registering the control with its parent {@link ng.directive:form form}.
11241125
*
11251126
* Note: `ngModel` will try to bind to the property given by evaluating the expression on the
11261127
* current scope. If the property doesn't already exist on this scope, it will be created

0 commit comments

Comments
 (0)