-
Notifications
You must be signed in to change notification settings - Fork 26.2k
feat(core): Expose Injector.destroy
on Injector
created with …
#60054
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
Conversation
3c88a3a
to
f1cf742
Compare
2c4e484
to
77bd499
Compare
77bd499
to
27d6098
Compare
27d6098
to
d4bd01b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed for: Public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed for: Public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
@JeanMeche what's the benefit of this vs create environment injector now? When to use each? |
|
So I could create a function that creates an injector that is destroyed automatically with the node injector without destroy ref handling? |
Here is an example : https://stackblitz.com/edit/angular-factory-di?file=src%2Fmain.ts (not suggesting that you should exactly do that, but you can). |
Why do you need destroy ref though? Won't it die with the injector it was based on? So if called in component it will die with the component injector? |
Injectors don't have references to their child injectors. |
…ector.create` There is no implementation change, this only expose `destroy` in a case where the injector can be owned in userland.
d4bd01b
to
2cd0426
Compare
Injector.destroy
on Injector
created with …Injector.destroy
on Injector
created with …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
This PR was merged into the repository by commit 4812215. The changes were merged into the following branches: main |
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. |
…
Injector.create
There is no implementation change, this only expose
destroy
in a case where the injector can be owned in userland.