angular.js - Is it possible to set trigger events when ui-router switches routes?
滿天的星座
滿天的星座 2017-05-15 16:55:16
0
1
557

I polled the server with $interval in the controller of a route. When switching to another route, the $interval was not canceled.
Is there an event for ui-router to switch routes?
In addition It’s not very clear that $scope is not destroyed when switching routes (¥destory is not triggered), but the link to a route scope will be executed once every time it is switched to a route?

滿天的星座
滿天的星座

reply all(1)
迷茫
$rootScope.$on('$stateChangeStart', function(){})
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template