-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
🚀 feature request
Relevant Package
This feature request is for @angular/forms
Description
The infrastructure surrounding ControlValueAccessor is widely adopted by component libraries, but currently the built-in ones are hardcoded to only be provided for ngModel, formControl and formControlName, preventing external libraries from benefiting from the existing implementations when implementing a new directive which wants to make use of the accessors.
Describe the solution you'd like
I would like to be able to have some way to also provide these accessors when my own directive is present (instead of ngModel, formControl, formControlName). I don't have a concrete suggestion of what that would look like.
Describe alternatives you've considered
A workaround is to tell users to add ngModel as well, but this is not only awkward, it also interferes as now the entire forms infrastructure kicks in and calls writeValue on its own etc.