-
Notifications
You must be signed in to change notification settings - Fork 24.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(core): establish proper injector resolution order for @defer
blocks
#55079
fix(core): establish proper injector resolution order for @defer
blocks
#55079
Conversation
…ocks This commit updates the `@defer` logic to establish proper injector resolution order. More specifically: - Makes node injectors to be inspected first, similar to how it happens when `@defer` block is not used. - Adds extra handling for the Router's `OutletInjector`, until we replace it with an `EnvironmentInjector`. Resolves angular#54864. Resolves angular#55028. Resolves angular#55036.
This PR was merged into the repository by commit 86a359b. |
…ocks (#55079) This commit updates the `@defer` logic to establish proper injector resolution order. More specifically: - Makes node injectors to be inspected first, similar to how it happens when `@defer` block is not used. - Adds extra handling for the Router's `OutletInjector`, until we replace it with an `EnvironmentInjector`. Resolves #54864. Resolves #55028. Resolves #55036. PR Close #55079
The fix from PR angular#55079 introduced a configuration of the injector chain, which wasn't properly handled by the injector debug utils, thus resulting in JS exceptions in DevTools. This commit updates injector debug utils logic that calculates injector resolution path to also handle `ChainedInjector`s. Resolves angular#55137.
The fix from PR #55079 introduced a configuration of the injector chain, which wasn't properly handled by the injector debug utils, thus resulting in JS exceptions in DevTools. This commit updates injector debug utils logic that calculates injector resolution path to also handle `ChainedInjector`s. Resolves #55137. PR Close #55144
The fix from PR #55079 introduced a configuration of the injector chain, which wasn't properly handled by the injector debug utils, thus resulting in JS exceptions in DevTools. This commit updates injector debug utils logic that calculates injector resolution path to also handle `ChainedInjector`s. Resolves #55137. PR Close #55144
…ocks (angular#55079) This commit updates the `@defer` logic to establish proper injector resolution order. More specifically: - Makes node injectors to be inspected first, similar to how it happens when `@defer` block is not used. - Adds extra handling for the Router's `OutletInjector`, until we replace it with an `EnvironmentInjector`. Resolves angular#54864. Resolves angular#55028. Resolves angular#55036. PR Close angular#55079
…#55144) The fix from PR angular#55079 introduced a configuration of the injector chain, which wasn't properly handled by the injector debug utils, thus resulting in JS exceptions in DevTools. This commit updates injector debug utils logic that calculates injector resolution path to also handle `ChainedInjector`s. Resolves angular#55137. PR Close angular#55144
@AndrewKushnir I believe this fix may have broken the resolution of services provided above the level of I know there have been some issues before with dynamic components being forgotten when refactoring injector resolution - and I suspect the same happened here. I'm happy to create a simple repro if what I'm saying doesn't resonate. Basically the repro would look like:
Expected ERROR:
There may or may not additional complexity in my app but I suspect this to be the basic structure needed. |
@simeyla thanks for reporting the issue. It'd be helpful if you could create a new ticket and provide a minimal repro (in a form of GitHub repository) with a few components (ideally using ViewContainerRef APIs to create components dynamically, i.e. without using CDK), so that we can perform further investigation.
Could you please confirm if the issue was not present before the fix (in earlier version)? |
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 updates the
@defer
logic to establish proper injector resolution order. More specifically:@defer
block is not used.OutletInjector
, until we replace it with anEnvironmentInjector
.Resolves #54864.
Resolves #55028.
Resolves #55036.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?