I want to know which page the current page was jumped from. What should I do? I used ui-router to print out $state but I couldn’t find any relevant content
PHP中文网2017-05-15 16:53:46
rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {
$rootScope.previousState = from;
$rootScope.previousParams = fromParams;
});