Edit: Turns out that are are two possible solutions:
1) See
Telling Angular Js to ignore a specific route
2) Or use $window.location.
Here is an example:
$scope.onLogoutClicked = function() {
$window.location = "http://google.com";
}
Difference between $window.location and $location
When should I use $location?
Any time your application needs to react to a change in the current URL or if you want to change the current URL in the browser.
What does it not do?
It does not cause a full page reload when the browser URL is changed. To reload the page after changing the URL, use the lower-level API, $window.location.href.
Notes:
- $window is a wrapper for window so that it can be unit tested.
- $window.location = "URL" and $window.location.href = "URL" does the
same thing