javascript / beginner
Snippet
Reactive Form Management with FormControl
FormControl is a core building block of Reactive Forms. It tracks the value, validation status, and user interaction for a single input field.
snippet.js
1
usernameControl = new FormControl('');
angular
Breakdown
1
usernameControl
The name of the variable that holds the form control object.
2
new FormControl('')
Creates a new control instance with an empty string as the initial value.