title: Unable to read Route Parameter in Angular 2
body: <p>I have successfully implemented route parameter in Angular JS for my other components in same project and for the new component also I am following the same way but It's not working and I am unable to understand the problem in the code.</p>
  
  <p>Below is the code of my routes file</p>
  
  <pre><code>import { Routes, RouterModule } from '@angular/router';
  import { CustomerBillComponent } from '../components/customer_bill.component';
  
  const routes: Routes = [
      { path: 'add-bill', component: CustomerBillComponent },
      { path: 'add-bill/:customer_reference', component: CustomerBillComponent },
  ];
  
  export const routing = RouterModule.forRoot(routes);
  </code></pre>
  
  <p>(I tried using different routes also, but it didn't work)</p>
  
  <p>Below is the code in My <em>CustomerBillComponent.ts</em> file</p>
  
  <pre><code>ngOnInit() {
      //When I visit /#/add-bill/CR452152
      let route_location = location['hash'].split('/')[1].toLowerCase();
      console.log(route_location); //prints add-bill in Console
      var customer_reference = this.route.snapshot.params['customer_reference'];
      console.log(customer_reference); //prints undefined
  }
  </code></pre>
  
  <p>Did I miss something</p>
  
  <p>Thanks in advance!!!</p>