Reactive forms

Angular reactive forms define the form model in the class code, with FormGroup, FormControl and FormBuilder. The state (value, validity, touched fields) is explicit and observable, which suits complex, dynamic forms or ones that need fine-grained testing.

Example

form = new FormGroup({
  email: new FormControl('', [Validators.required, Validators.email])
});

Related concepts

The whole glossary