-
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
Consolidate style loading logic #29617
Conversation
src/cdk/private/style-loader.ts
Outdated
* Loads a set of styles. | ||
* @param loader Component which will be instantiated to load the styles. | ||
*/ | ||
loadStyles(loader: Type<unknown>): void { |
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.
Usage looks a little redundant with styleLoader.loadStyles()
What about renaming this to just load
@@ -0,0 +1 @@ | |||
Private utilities meant to be used only within the CDK and Material. |
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.
This makes me wonder if this sort of utility is useful to other Angular component libraries. Maybe over time we could graduate these things to the framework or CDK
Creates a new `cdk/private` package in which we can put shared code that isn't meant to be public and creates a new style loader service that can be used to load structural styles for components.
…yles Switches the drag&drop module to use the common service to load the preview styles.
…tyles Switches the badge to use the common style loading service to load its structural styles.
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. |
Introduces a new
cdk/private
entrypoint that we can use for logic that needs to be shared, but shouldn't be public. Also moves our various implementations of style loading into it.