Improve this Doc View Source ngForm
- directive in module ng
Overview
Helper directive that makes it possible to create control groups inside a form
directive. These "child forms" can be used, for example, to determine the validity of a sub-group of controls.
Note:
ngForm
cannot be used as a replacement for <form>
, because it lacks its built-in HTML functionality. Specifically, you cannot submit ngForm
like a <form>
tag. That means, you cannot send data to the server with ngForm
, or integrate it with ngSubmit
. Directive Info
- This directive executes at priority level 0.
Usage
- as element:
<ng-form [name="string"]> ... </ng-form>
- as attribute:
<ANY [ng-form="string"]> ... </ANY>
- as CSS class:
<ANY class="[ng-form: string;]"> ... </ANY>
Arguments
Param | Type | Details |
---|---|---|
ngForm | name (optional) | string | Name of the form. If specified, the form controller will be published into the related scope, under this name. |
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.7.8/docs/api/ng/directive/ngForm