Skip to content

Commit b1214c1

Browse files
wesleychojamesdaily
authored andcommitted
docs(guide/forms): clarify how NgModelController can be added to scope
Closes angular#5200
1 parent 86fd24c commit b1214c1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: docs/content/guide/forms.ngdoc

+8-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ This ensures that the user is not distracted with an error until after interacti
115115

116116
A form is an instance of {@link api/ng.directive:form.FormController FormController}.
117117
The form instance can optionally be published into the scope using the `name` attribute.
118-
Similarly, control is an instance of {@link api/ng.directive:ngModel.NgModelController NgModelController}.
119-
The control instance can similarly be published into the form instance using the `name` attribute.
120-
This implies that the internal state of both the form and the control is available for binding in the view using the standard binding primitives.
118+
119+
Similarly, an input control that has the {@link api.ng.directive:ng-model} directive holds an
120+
instance of {@link api/ng.directive:ngModel.NgModelController NgModelController}.
121+
Such a control instance can be published as a property of the form instance using the `name` attribute
122+
on the input control. The name attribute specifies the name of the property on the form instance.
123+
124+
This implies that the internal state of both the form and the control is available for binding in
125+
the view using the standard binding primitives.
121126

122127
This allows us to extend the above example with these features:
123128

0 commit comments

Comments
 (0)