【发布时间】:2016-05-20 08:43:59
【问题描述】:
我正在尝试检查 next 是否有 hasToken 但不工作我得到错误:
TypeError: Cannot read property 'next' of undefined
有什么想法吗?
app.js
.run(function ($rootScope, $location,$log,User) {
$rootScope.$on("$locationChangeStart", function (event,next, current,jwtHelper) {
if(!localStorage.token.next){
location.path("/signin");
}
});
【问题讨论】:
标签: javascript angularjs token