AngularJS 外部URLへのリダイレクト

<html ng-app="myApp">
<body ng-controller="myCtrl">
    <p> <a href=""><button>Click me to redirect from template</button></a></p>
    <p ng-click="myFunction()"> <button>Click me to redirect from controller</button></p>
<script src=""></script>
    var app = angular.module('myApp',[]);
        $scope.myFunction = function(){
        $window.location.href = ''; //You should have http here.


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.