Since this recipe uses reactive forms, let's first take a look at home.ts, which initializes and sets up our form.
In the HomePage class, we have registerForm:FormGroup property, which is the collection of FormControl. Each FormControl is bound to the native FormControl in our template. In order to create FormGroup, we can do something like the following:
this.myForm = new FormGroup({ first: new FormControl('Nancy', Validators.minLength(2)), last: new FormControl('Drew'),});
In the preceding example, we are creating a FormGroup named myForm. The FormGroup constructor takes an object as input, which is the collection of FormControl. Each key in this object refers to some native FormControl in the template. The value in the ...