$scope.tempObject = {};
$http({
method: 'GET',
url: '/myRestUrl'
}).then(function successCallback(response) {
$scope.tempObject = response
console.log("Temp Object in successCallback ", $scope.tempObject);
}, function errorCallback(response) {
});
console.log("Temp Object outside $http ", $scope.tempObject);
我得到了回应,successCallback但没有得到$scope.tempObject外界的支持$http。其显示undefined。
如何访问response或$scope.tempObject之后$http
郎朗坤
隔江千里
红颜莎娜
相关分类