Replies: 6 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. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Is there any case where you would prefer the current behavior? |
Beta Was this translation helpful? Give feedback.
-
I think both behaviors are useful. I use current behavior to exe code before unsuscriptions, like "ngOnUnsuscription", the last chance to do something. |
Beta Was this translation helpful? Give feedback.
-
I don't think this somehow brings any benefit for users. Currently, subscriptions are unsubscribed after the original What's the benefit then? |
Beta Was this translation helpful? Give feedback.
-
Any updates? We also need this on our project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions