-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(cdk/private): create cdk-visually-hidden style loader #29757
Conversation
@Component({ | ||
standalone: true, | ||
styleUrl: 'visually-hidden.css', | ||
exportAs: 'cdkVisuallyHidden', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop the exportAs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this in because if I drop the exportAs
I get a duplicate component ID error :( Is there another way to resolve this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The full error is:
Detected identical metadata between following components:
- _MatBadgeStyleLoader and _VisuallyHiddenLoader
The metadata of one of each of these components should be changed to be slightly different in order to avoid conflicts at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, then it should be fine. Another way to work around it is to add a host binding.
b3c5188
to
d4f894b
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is part of a larger effort to remove the
mat.core()
mixin. The goal of this PR is to provide a way for components to load the styles for the.cdk-visually-hidden
class without needing it to be loaded viamat.core()
's call tocdk.a11y-visually-hidden()
.