Angular forms FormControlName Directive
In this article, we are going to see what is FormControlName in Angular 10 and how to use it.
FormControlName is used to sync a FormControl in an existing FormGroup to a form control element by name.
<form [FormControlName] ="name">
- Create the Angular app to be used
- In app.component.ts make an object that contain value for the input.
- In app.component.html use FormControlName to get values.
- Serve the angular app using ng serve to see the output.