You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/content/guide/dev_guide.services.$location.ngdoc
+3-4
Original file line number
Diff line number
Diff line change
@@ -635,10 +635,9 @@ then uses the information it obtains to compose hashbang URLs (such as
635
635
## Two-way binding to $location
636
636
637
637
The Angular's compiler currently does not support two-way binding for methods (see [issue](https://github.com/angular/angular.js/issues/404)). If you should require two-way binding
638
-
to the $location object (using {@link ng.directive:input.text
639
-
ngModel} directive on an input field), you will need to specify an extra model property
640
-
(e.g. `locationPath`) with two watchers which push $location updates in both directions. For
641
-
example:
638
+
to the $location object (using {@link input[text] ngModel} directive on an input
639
+
field), you will need to specify an extra model property (e.g. `locationPath`) with two watchers
640
+
which push $location updates in both directions. For example:
Copy file name to clipboardExpand all lines: docs/content/guide/forms.ngdoc
+8-8
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Server-side validation is still necessary for a secure application.
14
14
# Simple form
15
15
The key directive in understanding two-way data-binding is {@link ng.directive:ngModel ngModel}.
16
16
The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view, as well as view to the model.
17
-
In addition it provides an {@link ng.directive:ngModel.NgModelController API} for other directives to augment its behavior.
17
+
In addition it provides an {@link ngModel.NgModelController API} for other directives to augment its behavior.
18
18
19
19
<doc:example>
20
20
<doc:source>
@@ -113,11 +113,11 @@ This ensures that the user is not distracted with an error until after interacti
113
113
114
114
# Binding to form and control state
115
115
116
-
A form is an instance of {@link ng.directive:form.FormController FormController}.
116
+
A form is an instance of {@link form.FormController FormController}.
117
117
The form instance can optionally be published into the scope using the `name` attribute.
118
118
119
119
Similarly, an input control that has the {@link ng.directive:ngModel ngModel} directive holds an
120
-
instance of {@link ng.directive:ngModel.NgModelController NgModelController}.
120
+
instance of {@link ngModel.NgModelController NgModelController}.
121
121
Such a control instance can be published as a property of the form instance using the `name` attribute
122
122
on the input control. The name attribute specifies the name of the property on the form instance.
123
123
@@ -184,18 +184,18 @@ This allows us to extend the above example with these features:
184
184
# Custom Validation
185
185
186
186
Angular provides basic implementation for most common html5 {@link ng.directive:input input}
187
-
types: ({@link ng.directive:input.text text}, {@link ng.directive:input.number number}, {@link ng.directive:input.url url}, {@link ng.directive:input.email email}, {@link ng.directive:input.radio radio}, {@link ng.directive:input.checkbox checkbox}), as well as some directives for validation (`required`, `pattern`, `minlength`, `maxlength`, `min`, `max`).
187
+
types: ({@link input[text] text}, {@link input[number] number}, {@link input[url] url}, {@link input[email] email}, {@link input[radio] radio}, {@link input[checkbox] checkbox}), as well as some directives for validation (`required`, `pattern`, `minlength`, `maxlength`, `min`, `max`).
188
188
189
-
Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ngModel` {@link ng.directive:ngModel.NgModelController controller}.
189
+
Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ngModel` {@link ngModel.NgModelController controller}.
190
190
To get a hold of the controller the directive specifies a dependency as shown in the example below.
191
191
The validation can occur in two places:
192
192
193
193
* **Model to View update** -
194
-
Whenever the bound model changes, all functions in {@link ng.directive:ngModel.NgModelController#properties_$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link ng.directive:ngModel.NgModelController#methods_$setValidity NgModelController#$setValidity}.
194
+
Whenever the bound model changes, all functions in {@link ngModel.NgModelController#properties_$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link ngModel.NgModelController#methods_$setValidity NgModelController#$setValidity}.
195
195
196
196
* **View to Model update** -
197
-
In a similar way, whenever a user interacts with a control it calls {@link ng.directive:ngModel.NgModelController#methods_$setViewValue NgModelController#$setViewValue}.
198
-
This in turn pipelines all functions in the {@link ng.directive:ngModel.NgModelController#properties_$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link ng.directive:ngModel.NgModelController#methods_$setValidity NgModelController#$setValidity}.
197
+
In a similar way, whenever a user interacts with a control it calls {@link ngModel.NgModelController#methods_$setViewValue NgModelController#$setViewValue}.
198
+
This in turn pipelines all functions in the {@link ngModel.NgModelController#properties_$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link ngModel.NgModelController#methods_$setValidity NgModelController#$setValidity}.
199
199
200
200
In the following example we create two directives.
0 commit comments