In this section, we covered the FormBuilder class, which helps us cut down on boilerplate code when creating a form. In order to use it, we need to do the following:
- Import FormBuilder from @angular/forms
- Inject FormBuilder into the constructor
- Replace instances of new FormControl and FormGroup in the form