This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Pass existing injector into bootstrap function? #15784
Open
Description
I have a scenario where I declare a module, bootstrap it, then declare a 2nd module, and bootstrap the 2nd module. My constraint is that the 1st module's injector must be created before the 2nd module is declared.
However, because I bootstrap twice, I end up with 2 injectors. What do you guys think of allowing an optional injector
property on the config
object passed into bootstrap()
, which can be used to allow reusing an existing injector instead of creating a new one when bootstrapping an app.
If that sounds reasonable, I would be happy to put up a PR.
Thanks!