How to get query params from url in Angular 2?
<p>I use angular2.0.0-beta.7. When a component is loaded on a path like <code>/path?query=value1</code> it is redirected to <code>/path</code>. Why were the GET params removed? How can I preserve the parameters?</p>

<p>I have an error in the routers. If I have a main route like</p>

<pre><code>@RouteConfig([
  {
      path: '/todos/...',
      name: 'TodoMain',
      component: TodoMainComponent
  }
])
</code></pre>

<p>and my child route like </p>

<pre><code>@RouteConfig([
  { path: '/', component: TodoListComponent, name: 'TodoList', useAsDefault:true },
  { path: '/:id', component: TodoDetailComponent, name:'TodoDetail' }
])
</code></pre>

<p>then I can't get params in TodoListComponent. I am able to get</p>

<pre><code>params("/my/path;param1=value1;param2=value2") 
</code></pre>

<p>but I want the classic</p>

<pre><code>query params("/my/path?param1=value1&amp;param2=value2")
</code></pre>