angular2-take-until-destroy
angular2-take-until-destroy copied to clipboard
Less intrusive method of tracking subscriptions?
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?
Can you give me an example, please?