When working with forms in Angular, we are provided with two choices:-
Template-driven forms
Model-based reactive forms
Each one has its own use case depending upon how complex the form is.
Template-driven forms are useful when it’s a simple form such as login and signup, but they don’t scale as much as reactive forms. If you have very basic and simple requirements, use template-driven forms. The main disadvantage here is, unit testing is quite complicated to do without the form model inside the component.
Reactive forms are more robust as they’re more scalable, reusable, and testable. Most of the heavy lifting is done from the component class by putting the instances of the input fields on the template, making it easier to unit test. If you use large data-oriented forms with complex business logic, always use reactive forms.
In this article, we will discuss the reactive forms approach with decorator based validation. But before going into that first I will explain how to work without the decorator approach.

#form-validation #angular #typescript #reactive-forms #programming

Decorator Based Reactive Forms in Angular 
4.45 GEEK