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)並且應該通過非私有方法訪問。 –