angular.js - How to get the url of the previous page in angular
为情所困
为情所困 2017-05-15 16:51:46
0
2
613

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

为情所困
为情所困

reply all(2)
Ty80
    rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {
        $rootScope.previousState = from;
        $rootScope.previousParams = fromParams;
    });
迷茫

$state.current

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template