Angular provides two different techniques to create forms: reactive forms and template-driven forms. Reactive forms facilitate creating and managing angular forms and the related data in the following manner:
- They enable creating and managing form control objects in the component class, and binding them to the native form control elements in the component template. This is unlike the template-driven forms, where form controls are put into the component template, and bound to the data model properties in the component using directives such as ngModel.
- Data model values are pushed to the UI, and user-made changes are pulled back into the form control objects managed in the component class.
For reactive forms, you need to import ...