$location won’t help you with external URLs, use the $window service instead:
Note that you could use the window object, but it is bad practice since $window is easily mockable whereas window is not.
More Related Contents:
- htaccess redirect for Angular routes
- Redirect using AngularJS
- Is it feasible for a start-up of two developers to do full automated regression testing without manual testing? [closed]
- Why don’t the AngularJS docs use a dot in the model directive?
- If you are not using a .(dot) in your AngularJS models you are doing it wrong?
- AngularJS For Loop with Numbers & Ranges
- AngularJS-Twig conflict with double curly braces
- AngularJS – Create a directive that uses ng-model
- How to count total number of watches on a page?
- AngularJS ng-class if-else expression
- Cordova + Angularjs + Device Ready
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource- AngularJS
- Chaining Ajax calls in AngularJs
- Why angularjs will invoke function `name()` twice?
- AngularJS : ng-repeat filter when value is greater than
- Difference between ui-sref and $state.go in AngularJS UI-Router
- AngularJS intellisense not working on Visual Studio 2015
- Populate Dropdown 2 based on Dropdown 1 selection
- Angularjs filter negated
- how to download file using AngularJS and calling MVC API?
- How to set a global http timeout in AngularJs
- Can angularjs routes have optional parameter values?
- How to tie angular-ui’s typeahead with a server via $http for server side optimization?
- Bind class toggle to window scroll event
- Keycloak angular No ‘Access-Control-Allow-Origin’ header is present
- Angular adds strange options into select element when setting model value
- angularjs – ng-switch does not bind ng-model
- Contenteditable with ng-model doesn’t work
- AngularJS $http vs service vs ngResource
- Angularjs – Hide content until DOM loaded