-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(cdk/portal): fix incorrect injector hierarchy with DomPortalOutlet and child environment injectors #30610
Conversation
…et` and child environment injectors This commit fixes a regression that was introduced in angular#27427, where the injector hierarchy did not respect nested environment injectors. `DomPortalOutlet` was always using the application root as environment injector, yet the element injector may have a custom child environment injector as ancestor. This child environment injector has to be retrieved manually and passed as environment injector of the portal component. Fixes angular#30609
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. The timepicker test failures are probably because of the DST change in the US.
…peated non-null assertion This also has the benefit of minimizing more effectively, as the local variable can be renamed but the separate field accesses could not.
6399c2d
to
7705be6
Compare
The changes were merged into the following branches: main, 19.2.x |
…t and child environment injectors (#30610) * fix(cdk/portal): fix incorrect injector hierarchy with `DomPortalOutlet` and child environment injectors This commit fixes a regression that was introduced in #27427, where the injector hierarchy did not respect nested environment injectors. `DomPortalOutlet` was always using the application root as environment injector, yet the element injector may have a custom child environment injector as ancestor. This child environment injector has to be retrieved manually and passed as environment injector of the portal component. Fixes #30609 * refactor(cdk/portal): store application in local variable to avoid repeated non-null assertion This also has the benefit of minimizing more effectively, as the local variable can be renamed but the separate field accesses could not. (cherry picked from commit d0d5de4)
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 commit fixes a regression that was introduced in #27427, where the injector hierarchy
did not respect nested environment injectors.
DomPortalOutlet
was always using the applicationroot as environment injector, yet the element injector may have a custom child environment injector
as ancestor. This child environment injector has to be retrieved manually and passed as environment
injector of the portal component.
Fixes #30609