@@ -217,15 +217,19 @@ function FormController(element, attrs) {
217
217
* Directive that instantiates
218
218
* {@link ng.directive:form.FormController FormController}.
219
219
*
220
- * If `name` attribute is specified, the form controller is published onto the current scope under
220
+ * If the `name` attribute is specified, the form controller is published onto the current scope under
221
221
* this name.
222
222
*
223
223
* # Alias: {@link ng.directive:ngForm `ngForm`}
224
224
*
225
- * In angular forms can be nested. This means that the outer form is valid when all of the child
226
- * forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this
227
- * reason angular provides {@link ng.directive:ngForm `ngForm`} alias
228
- * which behaves identical to `<form>` but allows form nesting.
225
+ * In Angular forms can be nested. This means that the outer form is valid when all of the child
226
+ * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
227
+ * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
228
+ * `<form>` but can be nested. This allows you to have nested forms, which is very useful when
229
+ * using Angular validation directives in forms that are dynamically generated using the
230
+ * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`
231
+ * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an
232
+ * `ngForm` directive and nest these in an outer `form` element.
229
233
*
230
234
*
231
235
* # CSS classes
@@ -235,12 +239,12 @@ function FormController(element, attrs) {
235
239
* - `ng-dirty` Is set if the form is dirty.
236
240
*
237
241
*
238
- * # Submitting a form and preventing default action
242
+ * # Submitting a form and preventing the default action
239
243
*
240
244
* Since the role of forms in client-side Angular applications is different than in classical
241
245
* roundtrip apps, it is desirable for the browser not to translate the form submission into a full
242
246
* page reload that sends the data to the server. Instead some javascript logic should be triggered
243
- * to handle the form submission in application specific way.
247
+ * to handle the form submission in an application- specific way.
244
248
*
245
249
* For this reason, Angular prevents the default action (form submission to the server) unless the
246
250
* `<form>` element has an `action` attribute specified.
@@ -252,8 +256,9 @@ function FormController(element, attrs) {
252
256
* - {@link ng.directive:ngClick ngClick} directive on the first
253
257
* button or input field of type submit (input[type=submit])
254
258
*
255
- * To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This
256
- * is because of the following form submission rules coming from the html spec:
259
+ * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}
260
+ * or {@link ng.directive:ngClick ngClick} directives.
261
+ * This is because of the following form submission rules in the HTML specification:
257
262
*
258
263
* - If a form has only one input field then hitting enter in this field triggers form submit
259
264
* (`ngSubmit`)
0 commit comments