Do we have to unsubscribe when using switchMap operator in rxjs in Angular 2? : <p>In Angular 2 there are some observables that you do not need to unsubscribe from. For example http requests and activatedRoute.params.</p>

<p><a href="https://stackoverflow.com/questions/38008334/angular-rxjs-when-should-i-unsubscribe-from-subscription">Angular/RxJs When should I unsubscribe from `Subscription`</a></p>

<p>But what happens when I use switchMap on for example activatedRoute.params and inside that switchMap I access a service that returns an observable that would need to be unsubscribed if subscribed to in the usual way.</p>

<p>Something like this:</p>

<pre><code>this.activatedRoute.params
    .switchMap((params: Params) =&gt; this.userService.getUser(+params['id']))
    .subscribe((user: User) =&gt; this.user = user);
</code></pre>

<p>If I called this.userService without the switchMap and without activatedRoute.params I would have to unsubscribe from it.</p>

<pre><code>// userService.getUser() takes in optional id?: number.
this.subscription = this.userService.getUser().subscribe(
    (user: User) =&gt; {
        this.user = user;
    }
 );
</code></pre>

<p>And then later..</p>

<pre><code>this.subscription.unsubscribe();
</code></pre>

<p>My question is, do I need to unsubscribe from activatedRoute.params if I use switchMap on it and call a service that would need to be unsubscribed otherwise?</p>
