TIL, 2021-06-24
Angular Forms
FormControl
tracks the value and validation status of an individual form control.FormGroup
tracks the same values and status for a collection of form controls.FormArray
tracks the same values and status for an array of form controls.ControlValueAccessor
creates a bridge between AngularFormControl
instances and native DOM elements.- Form Builder: Syntactic sugar to create instance of
FormControl
,FormGroup
, orFormArray
.- Reference
- Form Builder is a service that does the same things as group, control, and array.
- What is difference between
formControlName
andformControl
?
Form Arrays
- Manages a collection of
AbstractControl
, which could be:FormGroup
,FormControl
, orFormArray
.