Angular v.14 and Strong Typed Forms
Learn one of the most remarkable features of Angular v.14.
We'll cover the following...
We'll cover the following...
As of Angular v.14, reactive forms are now strictly typed by default.
Reactive forms weren't type-safe in earlier versions, meaning that the form controls' value type any type leaving our application exposed to possible errors.
Update Angular
By migrating to version 14, Angular CLI will automatically execute a built-in migration to replace all existing form classes (like FormGroup and FormControl) with their corresponding untyped version, like in the example below:
Each untyped class (such as UntypedFormGroup) has the same properties and methods as its corresponding reactive form class. This kind of mapping technique is very ...