title: Angular2 queryParams throws "does not exist on type" error
body: <p>I got an Angular2-service that should return parameters from an URL like <a href="http://localhost:3001/?foobar=1236" rel="nofollow noreferrer">http://localhost:3001/?foobar=1236</a>  </p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { ActivatedRoute }     from '@angular/router';
  import 'rxjs/add/operator/map';
  
  @Injectable()
  
  export class ParameterService {
    constructor(private route: ActivatedRoute) {  }
  
    getParameter() {
      return this.route.snapshot.queryParams.foobar;
    }
  }
  </code></pre>
  
  <p>But when I call the getParameter() method of the service I get the error:</p>
  
  <pre><code>error TS2339: Property 'foobar' does not exist on type '{ [key: string]: any; }'
  </code></pre>
  
  <p>and after the error it returns the correct result. I can access the foobar parameter with the debugger without any problems. did someone had a similar issue? I could imagine that it gets called to early?</p>
  
  <p>(possible duplicate: <a href="https://stackoverflow.com/questions/39344301/angular2-rc6-property-queryparams-does-not-exist-on-type-routerstate">angular2 rc6: Property queryParams does not exist on type RouterState</a>)</p>