New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultValueAccessor directive should be usable in the hostDirectives array #48607
Labels
Milestone
Comments
2 tasks
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 1, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 1, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 1, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 2, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 2, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
Jan 2, 2023
This commit make the DefaultValueAccessor directive standalone allowing it to be used as hostDirective Fixes: angular#48607
pkozlowski-opensource
added
area: core
Issues related to the framework runtime
area: forms
core: host directives
labels
Jan 4, 2023
@dylhunn I saw the closing comment you've added to the PR created by @JeanMeche. Would you like this issue to be kept open for future reference, or close it and open a new one when time comes? |
pkozlowski-opensource
removed
the
area: core
Issues related to the framework runtime
label
Feb 8, 2023
This was referenced Apr 9, 2024
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
May 11, 2024
By make `DefaultValueAccessor` we'll allow developers to use as a host directive. Fixes angular#48607
JeanMeche
added a commit
to JeanMeche/angular
that referenced
this issue
May 11, 2024
By make `DefaultValueAccessor` we'll allow developers to use as a host directive. Fixes angular#48607
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which @angular/* package(s) are relevant/related to the feature request?
forms
Description
The
DefaultValueAccessor
directive is not standalone, which means that it cannot be currently used with thehostDirectives
array of a component.I have this scenario where it would be very handy for the
ngDefaultControl
directive to be applied on the host element from inside the component's class, leveraging the newhostDirectives
array from Angular 15.Desired code:
The code above throws the following build time error:
Proposed solution
The
DefaultValueAccessor
directive should be available also as standalone, for the new Angular 15 approaches.Alternatives considered
As a workaround, a custom component provider can make the "link" with the
DefaultValueAccessor
directive. But it's still better/easier to use thehostDirectives
approach for this, since it is more explicative.Current workaround:
The text was updated successfully, but these errors were encountered: