Following online examples, I have something like this in login.html:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.js"></script>
<script type="text/javascript" src="app/app.login.js"></script>
<div id="loginButton" ng-app="loginButton" ng-controller="loginControl">
<button ng-click="enterSite()">
Enter
</button>
</div>
Then in app.login.js:
var appButton = angular.module("loginButton", []);
appButton.controller("loginControl", ["$scope", "$window", function($scope, $window){
$scope.enterSite = function(){
$window.location.href = "../index.html";
}
}]);
However, it does not redirect to index.html when I press the button. There are no errors in the browser's log. I've copied most of the format from working examples, so I cannot find why it does not work for me.
Any tips would be appreciated.