![]() |
VOOZH | about |
The ng-form Directive in AngularJS is used to create a nested form i.e. one form inside the other form. It specifies an inherit control from the HTML form. It creates a control group inside a form directive which can be used to determine the validity of a sub-group of controls.
Syntax:
<ng-form [name="string"]> Contents... </ng-form>
Example 1: This example uses the ng-form Directive to hide the input text fields and display their content.
Output:
Example 2: This example uses the ng-form Directive to validate the email and save it.
Output: