angular.js - angular怎么获取前一个页面的url
为情所困
为情所困 2017-05-15 16:51:46
0
2
557

想知道当前页面是由哪个页面跳过来的,应该怎么做呢?我用ui-router,把$state打印出来但是没有找到相关的内容诶

为情所困
为情所困

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

$state.current

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!