title: How to get QueryParams from redirected URL in Angular
body: <p>I have a certain url where I have to redirect users for authentication and I will get a code as query params.</p>
  
  <p>Suppose I redirect user to <code>http://someurl.com</code> and it will be redirected to another url and I will get the code as query params like <code>http://anotherurl.com?code=1234</code></p>
  
  <p>So I am using <code>window.location.href="http://someurl.com"</code> to redirect user
  But how can I get this code in Angular?</p>