Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. angular.module("myapp").run(["$rootScope","$location","$AuthService", function($rootScope, $location ,$AuthService){
  2. $rootScope.$on('$routeChangeStart', function (event, next) {
  3. if($AuthService.isAuth()){
  4. console.log("entra");
  5. }
  6. else{
  7. $location.path("/login");
  8. }
  9. });
  10. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement