I am trying to implement Authorization on my angular application, when a route is changed I want to check whether the route is authorized for user or not. I tried with $ro
You can also use $location provider to do this like :
.run(['$rootScope','$location',function($rootScope,$location){
$rootScope.$on('$routeChangeStart', function(event,next, current) {
console.log('next',next);
console.log('location',$location.path());
console.log('location',$location.search()); // for route params
});
}])`