Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module("myapp").run(["$rootScope","$location","$AuthService", function($rootScope, $location ,$AuthService){
- $rootScope.$on('$routeChangeStart', function (event, next) {
- if($AuthService.isAuth()){
- console.log("entra");
- }
- else{
- $location.path("/login");
- }
- });
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement