Which property of a FormControl instance would you check to determine if the user has interacted with a particular form control?
- dirty
- pristine
- touched
- untouched
To determine if the user has interacted with a particular form control in Angular Reactive Forms, you would check the touched property of the FormControl instance. It becomes true when the user has focused and blurred the form control, indicating interaction. The dirty property indicates if the value has changed.
Loading...
Related Quiz
- Which change detection strategy checks the component only when its input properties change?
- A client asks you to highlight the currently active page link in the navigation menu. How would you achieve this in Angular?
- Your application needs to handle API rate limits. Which tool or method in Angular would you use to delay retries on a failed HTTP request?
- In Angular's router, what's the difference between redirectTo and component properties in a route configuration?
- In a scenario where you want to combine multiple Observables and wait for them all to complete, which operator would you use?