title: redirect to an absolute url in angularjs
body: <p>How to redirect user to an absolute url in angularjs. </p>
  
  <p>For example:
  i have a page, my current url (<a href="http://example.com/submit" rel="noreferrer">http://example.com/submit</a>), 
  once the user click some button in the web page, he has to get redirected to some other web page for example ('<a href="http://google.com" rel="noreferrer">http://google.com</a>').</p>
  
  <p>I tried using </p>
  
  <pre><code>$location.absUrl() == 'http://www.google.com'
  $location.path('http://www.google.com')
  $location.url('http://www.google.com')
  </code></pre>
  
  <p>But nothing works. </p>
  
  <p><strong>Note:</strong> 
  The rediretion should not occur from the web-server. Its an REST API.
  Wanted to achieve in client side(using angularjs) if the user is valid user(authenticated user), redirected him to portal)</p>
  
  <p>Thanks</p>