Skip to content

feat(core): Add destroyed property to EnvironmentInjector #61951

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jun 6, 2025

Similar to DestroyRef, this adds the destroyed property to EnvironmentInjector. It also has the ability to register callbacks with onDestroy, which throws if destroyed is already true.

This also omits the bit about whether those callbacks have executed since I realized the property is set to true before executing the callbacks.

Similar to `DestroyRef`, this adds the `destroyed` property to
`EnvironmentInjector`. It also has the ability to register callbacks with
`onDestroy`, which throws if `destroyed` is already `true`.

This also omits the bit about whether those callbacks have executed
since I realized the property is set to `true` before executing the
callbacks.
@atscott atscott added area: core Issues related to the framework runtime target: minor This PR is targeted for the next minor release labels Jun 6, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 6, 2025
@pullapprove pullapprove bot requested review from alxhub, kirjs and mmalerba June 6, 2025 23:07
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jun 6, 2025
Copy link
Contributor

@mmalerba mmalerba left a 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

@pullapprove pullapprove bot requested a review from crisbeto June 11, 2025 15:46
@pullapprove pullapprove bot requested a review from devversion June 11, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants