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

Commit f6e60c1

Browse files
committedDec 13, 2017
docs(ngForm): clarify usage and limitations
1 parent 223de59 commit f6e60c1

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed
 

‎src/ng/directive/form.js

+15-10
Original file line numberDiff line numberDiff line change
@@ -352,16 +352,21 @@ addSetValidityMethod({
352352
* @restrict EAC
353353
*
354354
* @description
355-
* Nestable alias of {@link ng.directive:form `form`} directive. HTML
356-
* does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
357-
* sub-group of controls needs to be determined.
358-
*
359-
* Note: the purpose of `ngForm` is to group controls,
360-
* but not to be a replacement for the `<form>` tag with all of its capabilities
361-
* (e.g. posting to the server, ...).
362-
*
363-
* @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
364-
* related scope, under this name.
355+
* Helper directive that makes it possible to create control groups inside a
356+
* {@link ng.directive:form `form`} directive.
357+
* These "child forms" can be used, for example, to determine the validity of a sub-group of
358+
* controls.
359+
*
360+
* <div class="alert alert-danger">
361+
* **Note**: `ngForm` cannot be used as a replacement for `<form>`, because it lacks its
362+
* [built-in HTML functionality](https://html.spec.whatwg.org/#the-form-element).
363+
* Specifically, you cannot submit `ngForm` like a `<form>` tag. That means,
364+
* you cannot send data to the server with `ngForm`, or integrate it with
365+
* {@link ng.directive:ngSubmit `ngSubmit`}.
366+
* </div>
367+
*
368+
* @param {string=} ngForm|name Name of the form. If specified, the form controller will
369+
* be published into the related scope, under this name.
365370
*
366371
*/
367372

0 commit comments

Comments
 (0)