好吧,我完全被这个目瞪口呆.(我可能会忽略一些明显但......)
我连续2次调用console.log.他们之间没有别的东西
console.log($state);
console.log($state.current);
Run Code Online (Sandbox Code Playgroud)
这是生成结果的图像

为什么2会产生不同的"当前"物体?怎么会发生这种情况?
这些调用是在解析路由依赖关系时在ajax调用中进行的.如果您需要更多代码或上下文,请告诉我们.
在Chrome和Firefox中确认了同样的问题
Ajax调用和包装函数(无论如何都没有修改)
normaCtrl.publicNorma = ['$http', '$state', '$stateParams', 'baseUrl', function ($http, $state, $stateParams, baseUrl)
{
var id = $stateParams.id;
return $http.get(baseUrl + "api/public/norma/" + id).then(
function (response) {
console.log($state);
console.log($state.current);
console.log($state.current.title);
return response.data;
}
);
}];
Run Code Online (Sandbox Code Playgroud)