-
Notifications
You must be signed in to change notification settings - Fork 100
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Execute ngOnDestroy later #195
Comments
It would be very nice if we could choose went to apply the decorator functionality. For me, i also need to execute this functionality before my component's ngOnDestroy in some cases. |
+1 |
Is there any case where you would prefer the current behavior? |
I think both behaviors are useful. I use current behavior to exe code before unsuscriptions, like "ngOnUnsuscription", the last chance to do something. |
I don't think this somehow brings any benefit for users. Currently, subscriptions are unsubscribed after the original What's the benefit then? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It should be interesting execute ngOnDestroy later (with a flag) to be able prevent subscription executions in ngOnDestroy. It is usefull with NGRX Store because we want to reset store on destroy component.
POC
https://stackblitz.com/edit/angular-ivy-yke7ut?file=src%2Fapp%2Fcomponents%2Fprimary%2Fprimary.component.ts
My proposal
xLama#1
The text was updated successfully, but these errors were encountered: