View source Improve this doc

ngForm
directive in module ng

Description

Nestable alias of form directive. HTML does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a sub-group of controls needs to be determined.

Usage

This directive can be used as custom element, but be aware of IE restrictions.

as element:
<ng-form
       [ngForm="{string}"]>
</ng-form>
as attribute
<ANY ng-form
     [name="{string}"]>
   ...
</ANY>
as class
<ANY class="ng-form [name: {string};]">
   ...
</ANY>

Parameters

ParamTypeDetails
name|ngForm
(optional)
string

Name of the form. If specified, the form controller will be published into related scope, under this name.