What are typed forms, and why do they matter?

Angular forms · Experienced

Model answer

Since Angular 14, reactive forms are strongly typed: new FormControl<string>('') knows its value is a string (or null unless you use nonNullable). FormGroup values are typed from their controls, so form.value.email is checked by the compiler.

This catches mistakes such as misspelled control names, and makes code safer when refactoring. Use nonNullable controls or fb.nonNullable to avoid null in values, and use getRawValue() when disabled controls must be included.

Learn this topic

Angular Tutorial: Beginner to Advanced .

Sign in to add your own answer.

More questions