angular2-take-until-destroy icon indicating copy to clipboard operation
angular2-take-until-destroy copied to clipboard

Less intrusive method of tracking subscriptions?

Open chriszrc opened this issue 7 years ago • 1 comments

I found this library because it was mentioned on SO:

https://stackoverflow.com/questions/38008334/angular-rxjs-when-should-i-unsubscribe-from-subscription

I really liked the idea of tackling this problem with an unobtrusive approach like decorators, but the approach you've laid out still seems like too much boilerplate (all the takeUntils). What if the decorator instead used AOP and wrapped subscribe calls, then you'd just need the decorator and the ngOnDestroy method? Did you consider such an approach?

chriszrc avatar Nov 22 '17 16:11 chriszrc

Can you give me an example, please?

NetanelBasal avatar Nov 23 '17 06:11 NetanelBasal