VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/angularjs-ng-form-directive/

⇱ AngularJS ng-form Directive - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AngularJS ng-form Directive

Last Updated : 1 Aug, 2022

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:

👁 Image
 

Example 2: This example uses the ng-form Directive to validate the email and save it. 

Output:

👁 Image
 
Comment

Explore