In Angular's reactive forms, the method used to mark a control as touched is called ______.
- markAsDirty()
- markAsTouched()
- setDirty()
- setTouched()
In Angular's reactive forms, the method used to mark a control as touched is called markAsTouched(). This method is used to indicate that a form control has been interacted with by the user. It's commonly used for validation and to show error messages for untouched controls.
Loading...
Related Quiz
- In a large application, you observe that the initial load time is quite high. What strategy can you adopt to improve the user's perceived performance?
- An Observable that can emit multiple values over time is different from a Promise, which can resolve only ________.
- For which purpose might you consider using dynamic components in Angular?
- Which directive is used in Angular for two-way data binding in template-driven forms?
- You are building a multi-step form in your Angular application. Each step should have its own URL path without reloading the entire page. How would you design the routing for this?