FormBuilder
FormBuilder
Stable Class
What it does
Creates an AbstractControl
from a user-specified configuration.
It is essentially syntactic sugar that shortens the new FormGroup()
, new FormControl()
, and new FormArray()
boilerplate that can build up in larger forms.
How to use
To use, inject FormBuilder
into your component class. You can then call its methods directly.
import {Component, Inject} from '@angular/core';