title: grab query params from redirect angular 5
body: <p>My problem is I'm using auth0 as my authentication service, now when a user logs in and is authenticated it gets redirected back to my callback url which then decides where to send the user now my problem is when you get redirected back to your callback url from auth0 there are queryParams in the url string like so..</p>
  
  <p><code>http://localhost:4200/account/login/callback#access_token="dsadsadsadsa dasdsaa"</code> just as an example but then in a split second the query string is removed and its left at <code>http://localhost:4200</code> now Im trying to grab the query Params using this method</p>
  
  <pre><code>this.activatedRoute.queryParams.subscribe(params =&gt; {
      console.log(params);
  });
  </code></pre>
  
  <p>now this should work but the console.log is an empty object every time, I think its because of that url change that happens..</p>
  
  <p>Is there some way I can grab the query params before that removal??</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Basically what is happening is I'm getting authenticated then I get redirected to </p>
  
  <p><code>localhost:4200/account/login/callback?acessToken="dasdasdaefssves"</code> </p>
  
  <p>but then the route changes to </p>
  
  <p><code>localhost:4200/account/login/callback</code> </p>
  
  <p>without the query parameters before the <code>activatedRoute</code> function gets a chance to run!</p>
  
  <p>Any help would be appreciated!</p>