fix(core): collect providers from NgModules while rendering @defer block#52881
Closed
AndrewKushnir wants to merge 2 commits intoangular:mainfrom
Closed
fix(core): collect providers from NgModules while rendering @defer block#52881AndrewKushnir wants to merge 2 commits intoangular:mainfrom
@defer block#52881AndrewKushnir wants to merge 2 commits intoangular:mainfrom
Conversation
473d4e6 to
da5e81f
Compare
da5e81f to
732004d
Compare
a36117e to
3138f09
Compare
3138f09 to
1e7df8e
Compare
Contributor
Author
alxhub
approved these changes
Feb 23, 2024
…block Currently, when a `@defer` block contains standalone components that import NgModules with providers, those providers are not available to components declared within the same NgModule. The problem is that the standalone injector is not created for the host component (that hosts this `@defer` block), since dependencies become defer-loaded, thus no information is available at host component creation time. This commit updates the logic to collect all providers from all NgModules used as a dependency for standalone components used within a `@defer` block. When an instance of a defer block is created, a new environment injector instance with those providers is created. Resolves angular#52876.
1e7df8e to
128d82f
Compare
Contributor
Author
Contributor
|
This PR was merged into the repository by commit dcb9deb. |
dylhunn
pushed a commit
that referenced
this pull request
Feb 23, 2024
…block (#52881) Currently, when a `@defer` block contains standalone components that import NgModules with providers, those providers are not available to components declared within the same NgModule. The problem is that the standalone injector is not created for the host component (that hosts this `@defer` block), since dependencies become defer-loaded, thus no information is available at host component creation time. This commit updates the logic to collect all providers from all NgModules used as a dependency for standalone components used within a `@defer` block. When an instance of a defer block is created, a new environment injector instance with those providers is created. Resolves #52876. PR Close #52881
1 task
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when a
@deferblock contains standalone components that import NgModules with providers, those providers are not available to components declared within the same NgModule. The problem is that the standalone injector is not created for the host component (that hosts this@deferblock), since dependencies become defer-loaded, thus no information is available at host component creation time.This commit updates the logic to collect all providers from all NgModules used as a dependency for standalone components used within a
@deferblock. When an instance of a defer block is created, a new environment injector instance with those providers is created.Resolves #52876.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?