-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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): collect providers from NgModules while rendering @defer
block
#52881
Closed
Conversation
This file contains 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
AndrewKushnir
added
area: core
Issues related to the framework runtime
target: patch
This PR is targeted for the next patch release
core: defer
Issues related to @defer blocks.
labels
Nov 14, 2023
AndrewKushnir
force-pushed
the
defer_fix_52876
branch
2 times, most recently
from
November 15, 2023 02:02
473d4e6
to
da5e81f
Compare
AndrewKushnir
force-pushed
the
defer_fix_52876
branch
from
February 2, 2024 17:45
da5e81f
to
732004d
Compare
AndrewKushnir
added
the
action: review
The PR is still awaiting reviews from at least one requested reviewer
label
Feb 2, 2024
AndrewKushnir
force-pushed
the
defer_fix_52876
branch
2 times, most recently
from
February 2, 2024 23:52
a36117e
to
3138f09
Compare
AndrewKushnir
force-pushed
the
defer_fix_52876
branch
from
February 13, 2024 06:30
3138f09
to
1e7df8e
Compare
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.
AndrewKushnir
force-pushed
the
defer_fix_52876
branch
from
February 23, 2024 19:35
1e7df8e
to
128d82f
Compare
AndrewKushnir
added
action: presubmit
The PR is in need of a google3 presubmit
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Feb 23, 2024
AndrewKushnir
added
action: merge
The PR is ready for merge by the caretaker
action: presubmit
The PR is in need of a google3 presubmit
and removed
action: presubmit
The PR is in need of a google3 presubmit
labels
Feb 23, 2024
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
area: core
Issues related to the framework runtime
core: defer
Issues related to @defer blocks.
target: patch
This PR is targeted for the next patch release
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
@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 Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?