0
var requestOne = $http({
method: 'POST',
url: $rootScope.apisrvr + 'user/user_signin',
data: { username: $scope.user.username, password: $scope.user.password },
});
这个值是我的代码,当我写:console.log(requestOne);
我得到: that获得承诺对象的角度
我只想得到$$state/value/data/salt
。但是,当我尝试console.log(requestOne.$$state.value.data.salt);
时,我收到错误TypeError: Cannot read property 'data' of undefined
。我如何从这里获得salt
?
Upvoted以下正确的答案,但总的来说还记得[任何以'$$'开头的角度属性都是_ private_](http://stackoverflow.com/questions/19338493/what-is-the-double-dollar-sign-used-for-in-angular)并且应该通过非私有方法访问。 –