bier hier
bier hier

Reputation: 22520

angularjs: how to redirect to a different url?

In my angularjs app I want to redirect to a different site / domain. I am using:

$location.url(someOtherDomain);

How can I redirect to this url from my angularjs app?

Upvotes: 1

Views: 49

Answers (2)

Gopal Palraj
Gopal Palraj

Reputation: 58

You can use below method:

$window.open('https://someurl.com','_blank');

Upvotes: 0

th3n3wguy
th3n3wguy

Reputation: 3737

You can use the $window object that can be injected:

return $window.location = 'https://someurl.com'

Upvotes: 1

Related Questions