33@sortOrder 290
44@description
55
6+ # Forms
7+
68Controls (`input`, `select`, `textarea`) are ways for a user to enter data.
79A Form is a collection of controls for the purpose of grouping related controls together.
810
@@ -14,7 +16,7 @@ be circumvented and thus can not be trusted. Server-side validation is still nec
1416secure application.
1517
1618
17- # Simple form
19+ ## Simple form
1820The key directive in understanding two-way data-binding is {@link ng.directive:ngModel ngModel}.
1921The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view,
2022as well as view to the model. In addition it provides an {@link ngModel.NgModelController API}
@@ -62,7 +64,7 @@ For example: inputs of type `email` must have a value in the form of `user@domai
6264
6365
6466
65- # Using CSS classes
67+ ## Using CSS classes
6668
6769To allow styling of form as well as controls, `ngModel` adds these CSS classes:
6870
@@ -126,7 +128,7 @@ and failing to satisfy its validity.
126128
127129
128130
129- # Binding to form and control state
131+ ## Binding to form and control state
130132
131133A form is an instance of {@link form.FormController FormController}.
132134The form instance can optionally be published into the scope using the `name` attribute.
@@ -208,7 +210,7 @@ didn't interact with a control
208210
209211
210212
211- # Custom model update triggers
213+ ## Custom model update triggers
212214
213215By default, any change to the content will trigger a model update and form validation. You can
214216override this behavior using the {@link ng.directive:ngModelOptions ngModelOptions} directive to
@@ -249,7 +251,7 @@ will update the model only when the control loses focus (blur event).
249251
250252
251253
252- # Non-immediate (debounced) model updates
254+ ## Non-immediate (debounced) model updates
253255
254256You can delay the model update/validation by using the `debounce` key with the
255257{@link ng.directive:ngModelOptions ngModelOptions} directive. This delay will also apply to
@@ -290,7 +292,7 @@ after last change.
290292 </file>
291293</example>
292294
293- # Custom Validation
295+ ## Custom Validation
294296
295297Angular provides basic implementation for most common HTML5 {@link ng.directive:input input}
296298types: ({@link input[text] text}, {@link input[number] number}, {@link input[url] url},
@@ -407,7 +409,7 @@ In the following example we create two directives:
407409 </file>
408410</example>
409411
410- # Modifying built-in validators
412+ ## Modifying built-in validators
411413
412414Since Angular itself uses `$validators`, you can easily replace or remove built-in validators,
413415should you find it necessary. The following example shows you how to overwrite the email validator
@@ -452,7 +454,7 @@ Note that you can alternatively use `ng-pattern` to further restrict the validat
452454</example>
453455
454456
455- # Implementing custom form controls (using `ngModel`)
457+ ## Implementing custom form controls (using `ngModel`)
456458Angular implements all of the basic HTML form controls ({@link ng.directive:input input},
457459{@link ng.directive:select select}, {@link ng.directive:textarea textarea}),
458460which should be sufficient for most cases. However, if you need more flexibility,
0 commit comments