title: Route navigation inside HttpInterceptor
body: <p>Is it possible to navigate to a specific route when a 401 error is catched, inside an HttpInterceptor?</p>
  
  <p>What I've tried to do is:</p>
  
  <pre><code>intercept(req: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
  ​    return next.handle(req)
          .do((event: HttpEvent&lt;any&gt;) =&gt; {}, (error: any) =&gt; {
               if (error instanceof HttpErrorResponse) {
                   if (error.status === 401) {
                       this.router.navigate(['/signin']);
                   }
               }
           });
  ​}
  </code></pre>
  
  <p>But nothing is happening.</p>
  
  <p>I can redirect to signin page only if using</p>
  
  <pre><code>window.location.href = '/signin';
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>this.router.navigate(['/signin']);
  </code></pre>