I want to check if the User is still Active if not I want to redirect it to the Login page
I am having this check in a controller which is not a good Idea. Can someone help me please.
this is the Controller
pmaster.controller('AuthenticationCheckControll', ['localStorageService','$scope', '$location', '$window', function (localStorageService, $scope, $location, $window) {
var isValid = localStorageService.get("userID"); // I want this condition be check on every view in this application if (isValid ==null) { $window.location = "/AngularView/html/Master.html#/Login"; }
}]);