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
docs-bug(cdk/layout): LayoutModule is not needed #24248
Comments
I think that this is a leftover from before |
Perhaps it's worth using "providedIn: LayoutModule" so the services could be included in lazy loaded modules only instead of the app module? |
These services were always intended to be global so that the cached state can be reused as much as possible. |
I get that. However if you use |
The same is true for |
Not quite. If I use it in lazy loaded module only it will increase my initial bundle size. |
That's not how it works though. |
However, webpack is capable of making a chunk shared across other lazy loaded chunks. |
Documentation Feedback
In the docs it's mentioned that we need to import LayoutModule in order to use BreakpointObserver and MediaMatcher.
In the meantime from the source code it looks like the module is not needed for any purposes.
Affected documentation page
https://material.angular.io/cdk/layout/api
The text was updated successfully, but these errors were encountered: