title: Optional Parameters While Routing angular2
body: <p>How to define optional parameters in routing of angular2.my routing configuration like this:</p>
  
  <pre><code>&lt;a [routerLink]="['../abc',{xyz: blabla}]"&gt;
       and 
  &lt;a [routerLink]="['../abc']"&gt;
  
  { path: '/abc/:xyz', component: abc, name: 'abc' },  // Here i want xyz as optional perameter
  </code></pre>
  
  <p>so the problem is whenever i am using first method with parameter <code>blabla</code> it works fine because at the time of routing i have defined parameter <code>xyz</code>
      but in case of second method i dont want to send parameter so the URL becomes</p>
  
  <p><a href="http://localhost:8080/#/sideNav/abc/" rel="nofollow">http://localhost:8080/#/sideNav/abc/</a></p>
  
  <p>which is laoding first time fine but after refresh page nothing shows whole window is getting blank with no contents.
  so is there any method to provide optional parameters while routing in angular2.</p>
  
  <pre><code>i have also tried without defining parameters like this
  
  { path: '/abc', component: abc, name: 'abc' }
  </code></pre>
  
  <p>but this will throw error in case of value of xyz is <code>1</code> it converts <code>1</code> into <code>true</code></p>