We then create the Form Model in component class using Form Group Form Control Form Arrays.
Example of angular forms. The ng-model directive binds two input elements to the user object in the model. Angular uses the assigned name to register the element with the NgForm directive attached to the parent element. The example added a name attribute to the element and set it to name which makes sense for the heros name.
Reactive forms also known as Model-driven forms is one of the two ways to build Angular forms. Any unique value will do but using a descriptive name is helpful. To build reactive forms first we need to import ReactiveFormsModule.
The formCtrl controller sets initial values to the master object and defines the reset method. The ng-controller directive defines the application controller.