
To make form handling less UI-dependent, @angular/forms provides a set of primitives for modelling forms: FormControl, FormGroup, and FormArray.
To make form handling less UI-dependent, @angular/forms provides a set of primitives for modelling forms: FormControl, FormGroup, and FormArray.
FormControl is an indivisible part of the form, an atom. It usually corresponds to a simple UI element, such as an input.
const c = new FormControl('Init Value', Validators.required);
A FormControl has a value, status, and a map of errors:
expect(c.value).toEqual('Init Value');
expect(c.errors).toEqual(null); //null means 'no errors'
expect(c.status).toEqual('VALID');
FormGroup is a fixed-size collection...