I don't know the scenarios where I should unsubscribe from route.params
observable.
- Angular docs says we don't need to unsubscribe.
So what is the use cases where I should unsubscribe?
I don't know the scenarios where I should unsubscribe from route.params
observable.
So what is the use cases where I should unsubscribe?
As per this answer, you should not subscribe except for being a dynamic or a child component:
Unsubscribe from the ActivatedRoute observables like route.params if they are subscribed inside a nested (Added inside tpl with the component selector) or dynamic component as they may be subscribed many times as long as the parent/host component exists. No need to unsubscribe from them in other scenarios as mentioned in the quote above from Routing & Navigation docs.