The method setValidators() and clearValidators() belong to the ______ class in Angular's Reactive Forms.
- AbstractControl
- FormControl
- FormGroup
- FormValidator
The methods setValidators() and clearValidators() belong to the AbstractControl class in Angular's Reactive Forms. AbstractControl is a common base class for FormControl, FormGroup, and FormArray. These methods allow developers to set and clear validation functions for form controls, providing control over input validation in reactive forms.
Loading...
Related Quiz
- What is the primary purpose of the RouterOutlet directive in Angular?
- What's the primary difference between structural and attribute directives in Angular?
- How can you prevent a particular component from being checked during the entire change detection cycle?
- In Angular's Reactive Forms, the ______ is a service that provides convenient methods to construct form controls.
- When testing asynchronous operations in Angular, which utility can be used to handle asynchronous tasks inside test specs?