How to redirect user to an absolute url in angularjs.
For example:
i have a page, my current url (http://example.com/submit),
once the user click some button in the web page, he has to get redirected to some other web page for example ('http://google.com').
I tried using
$location.absUrl() == 'http://www.google.com'
$location.path('http://www.google.com')
$location.url('http://www.google.com')
But nothing works.
Note:
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)
Thanks