Angular · Middle · Question 40 of 75
What does implementing ControlValueAccessor allow?
- ✓Correct answer: A custom component (e.g. a star rating) works with
formControlNameandngModellike a native input - 2Reading private fields of any form control
- 3Validating forms on the server
Explanation
Implement writeValue, registerOnChange, registerOnTouched (and optionally setDisabledState) and provide NG_VALUE_ACCESSOR. The forms API then talks to your component through these methods.