.run(["$transitions",function ($transitions, $state) { $transitions.onSuccess({}, function (transition) { var currentRoute = transition.to().name; if (currentRoute.indexOf("from") != -1) { //监听路由变化,当跳出from页面时执行内容 } else { } }); }]);
.run(["$transitions",function ($transitions, $state) { $transitions.onSuccess({}, function (transition) { var currentRoute = transition.to().name; if (currentRoute.indexOf("from") != -1) { //监听路由变化,当跳出from页面时执行内容 } else { } }); }]);