refactor(core): create a standalone injector during applicationBootstrap#45766
refactor(core): create a standalone injector during applicationBootstrap#45766pkozlowski-opensource wants to merge 2 commits intoangular:masterfrom
Conversation
This commit changes the injectors hiearchy created during applicationBootstrap. From now on a standalone injector (holding all the ambient providers of a standalone component) is create as a child of the application injector. This change alligns injectors hierarchy for bootstrapped and dynamically created standalone components.
| // Collect providers from the root standalone component | ||
| // and all of its dependencies (NgModule, other standalone Components) | ||
| // and make those providers available in the DI tree. | ||
| ...importProvidersFrom(rootComponent), |
There was a problem hiding this comment.
Separate question (not something we need to address in this PR): should we prevent the importProvidersFrom interface from expanding a standalone component into ambient providers?
Internally it needs to do this because of NgModules importing standalone components, but expanding a standalone component directly is not really its intended use case.
There was a problem hiding this comment.
Absolutely, this great follow-up task, will do it in a separate PR!
ee234d4 to
948d083
Compare
|
This PR was merged into the repository by commit 2b5c2d6. |
|
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 changes the injectors hierarchy created during applicationBootstrap.
From now on a standalone injector (holding all the ambient providers of a
standalone component) is create as a child of the application injector.
This change aligns injectors hierarchy for bootstrapped and dynamically
created standalone components.