Angular forms NgModelGroup Directive Last Updated : 04 Jul, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we are going to see what is NgModelGroup in Angular 10 and how to use it. The NgModelGroup is used to create a top-level form group Instance, and it binds the form to the given form value. Syntax: <div ngModelGroup="name"></div> NgModule: Module used by NgModelGroup is: FormsModule Selectors: [ngModelGroup] Approach: Create an Angular app to be use.dIn app.component.ts make an object that contains value for the input.In app.component.html use ngModelGroup to get values.Serve the angular app using ng serve to see the output. Example: app.component.ts import { Component, Inject } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { gfg:any; setValue() { this.gfg = {first: 'Geeky', email: '[email protected]'}; } } app.component.html <br> <form #f="ngForm"> <div ngModelGroup="gfg" #nameCtrl="ngModelGroup"> Name: <input name="first" [ngModel]="gfg.first" > Email: <input name="email" [ngModel]="gfg.email" > </div> </form> <br><br> <button (click)="setValue()">Set value</button> Output: Reference: https://angular.io/api/forms/NgModelGroup Comment More infoAdvertise with us Next Article Angular forms NgModelGroup Directive T taran910 Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Directives Angular10 Similar Reads Angular forms NgModel Directive In this article, we are going to see what is NgModel in Angular 10 and how to use it. NgModel is used to create a top-level form group Instance, and it binds the form to the given form value. Syntax: <Input [(NgModel)= 'name']> NgModule: Module used by NgModel is: FormsModule Selectors: [ngMod 1 min read Angular forms NgForm Directive In this article, we are going to see what is NgForm in Angular 10 and how to use it. NgForm is used to create a top-level form group Instance, and it binds the form to the given form value. Syntax: <form #FormName = "ngForm"> </form> NgModule: Module used by NgForm is: FormsModule Select 1 min read AngularJS ng-form Directive 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 [ 1 min read AngularJS ng-model Directive The ngModel directive is a directive that is used to bind the values of the HTML controls (input, select, and textarea) or any custom form controls, and stores the required user value in a variable and we can use that variable whenever we require that value. It also is used during form validations. 4 min read AngularJS ng-focus Directive The ng-focus Directive in AngluarJS is used to apply custom behavior when an element is focused. It can be used to show/hide some element or it can pop up an alert when an element is being focused. It is supported by <a>, <input>, <select> and <textarea> elements. Syntax: 1 min read Like