使用 angular-ui-router,$on監聽事件變化時$locationChangeSuccess ?能監聽到,$stateChangeSuccess 監聽不到,是什么原因;代碼如下:.run(['$rootScope','$location', function($rootScope, $location) { ?$rootScope.$on('$stateChangeSuccess', function(newV) {//****這是無效的 ?????????$rootScope.path = $location.path(); ?});????????$rootScope.$on('$locationChangeSuccess', function(newV) { ?????????$rootScope.path = $location.path(); ?});}])
$locationChangeSuccess 與 $stateChangeSuccess
yuanfengjituan
2016-11-17 15:47:52