-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(overlay): injection errors for scroll strategy providers in lazy-loaded modules #11213
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
fix(overlay): injection errors for scroll strategy providers in lazy-loaded modules #11213
Conversation
Marking as a P2 since it's a regression. |
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.
LGTM
997b921
to
a6c6eae
Compare
@crisbeto Is there a specific reason you choose to revert back other services to classic providers, instead of going the other way by providing I'm asking because it would lighten me up a lot about new tree-shakable providers (doc is saying to use them everywhere, but Angular core and Material are still using classic providers for their main services, so I'm confused about what should be done and I do a library where it's important). |
@cyrilletuzi The |
src/lib/tooltip/tooltip-module.ts
Outdated
provide: MAT_TOOLTIP_SCROLL_STRATEGY, | ||
deps: [Overlay], | ||
useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, | ||
} |
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.
It looks like this object literal provider is also not working. We should just change all of them at this point.
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 should also mention that it's possibly an issue w/ Closure Compiler being too aggressive.
a6c6eae
to
ebabfe3
Compare
I've moved all the object literal providers into variables @jelbourn. |
@crisbeto Please fix the lint test |
Good to go @tinayuangao. |
ebabfe3
to
bafc7eb
Compare
@crisbeto Please rebase. Thanks! |
…loaded modules Fixes injection errors being thrown by the overlay-based providers that have injection tokens for the default scroll strategy. The error comes from the fact that the scroll strategies were being provided at the root, whereas the `Overlay` provider was provided normally, causing it to be missing when a module is lazy-loaded. Fixes angular#10820.
bafc7eb
to
c61a1cc
Compare
Rebased. |
Changed to |
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. |
Fixes injection errors being thrown by the overlay-based providers that have injection tokens for the default scroll strategy. The error comes from the fact that the scroll strategies were being provided at the root, whereas the
Overlay
provider was provided normally, causing it to be missing when a module is lazy-loaded.Fixes #10820.