title: Angular 5 router.navigate does not work
body: <p>I'm trying to redirect a user to another page based on some condition.
  Here's my example login component:</p>
  
  <pre><code>  ngOnInit() {
      console.log("&gt;&gt;&gt; router", this.router)
      console.log("&gt;&gt;&gt; activatedRoute", this.activatedRoute)
  
      if (this.activatedRoute.queryParams['value'].param === 'value') {
        console.log("&gt;&gt;&gt; redirecting")
        this.router.navigate(['home']);
      }
    }
  </code></pre>
  
  <p>If I navigate to the login component without a parameter, then I'm shown the login component template, that's good.</p>
  
  <p>However, when I navigate to the login component with a parameter named param and the value of value, then I want to redirect the user to the home page.  That's not working.</p>
  
  <p>Here's my home page route:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  
  import { HomeComponent } from './home.component';
  import { RouterModule, Routes } from '@angular/router';
  
  const thisRoute: Routes = [
    {
      path: 'home',
      component: HomeComponent
    }
  ];
  
  @NgModule({
    imports: [
      RouterModule.forRoot(thisRoute, {
        useHash: true, initialNavigation: false
      })
    ],
    declarations: [
      HomeComponent
    ]
  })
  export class HomeModule { }
  </code></pre>
  
  <p>I've created a test project in github for you to download and run on your computer.  Just download this project: <a href="https://github.com/wvary/route-test" rel="noreferrer">https://github.com/wvary/route-test</a></p>
  
  <p>Run <code>npm install</code>.</p>
  
  <p>Then run <code>npm run start</code>.</p>
  
  <p>Navigate to <a href="http://localhost:8080/#/home" rel="noreferrer">http://localhost:8080/#/home</a></p>
  
  <p>You should see something like:</p>
  
  <p><a href="https://i.stack.imgur.com/LEa1N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LEa1N.png" alt="enter image description here"></a></p>
  
  <p>You can see the content of each page by click on the three links.
  The idea is to be on the home page when you click on the middle link.</p>
  
  <p>Thanks</p>