2016-10-09 3 views

답변

2

Sajeetharan의 '대답은 정확하지만은 현재 scope.If 당신이

run.$inject = ['$rootScope', '$location', '$cookieStore', '$http']; 

    function run($rootScope, $location, $cookieStore, $http) { 
    $rootScope.$on('$locationChangeStart', function(event, next, current) { 

      console.log($location.path()); 

     }); 
    } 
    app.run(run); 
처럼 추가 할 때마다 상태 변화를 원하는
3

,

$scope.$on('$locationChangeStart', function(event) { 
    //add your logic 
}); 
관련 문제