1

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?

bier hier
  • 20,970
  • 42
  • 97
  • 166
  • Possible duplicate of [How to redirect to another page using AngularJS?](https://stackoverflow.com/questions/27941876/how-to-redirect-to-another-page-using-angularjs) – msorce Feb 13 '18 at 00:56

2 Answers2

1

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

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

th3n3wguy
  • 3,649
  • 2
  • 23
  • 30
0

You can use below method:

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