By providing the SubscriptionService on component level it follows the lifecycle of the component. So onDestroy it will also destroy and close subscriptions the exact same way you did here, except for not having to setup an observable for each component.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We've made a service in one of our Angular packages to handle the
takeUntil
route more easily:github.com/studiohyperdrive/ngx-to...
By providing the
SubscriptionService
on component level it follows the lifecycle of the component. So onDestroy it will also destroy and close subscriptions the exact same way you did here, except for not having to setup an observable for each component.