0

when i get the variable out of the codeblock it returns undefined.. is there a way i could get it out of the code block.. //HTTP REQUEST

      UserService.GetUserFollowing($stateParams.id, $scope.data.id, -1, -1)
            .success(function(data, status) {                      
              $scope.status = status;
              console.log($scope.status) //returns 200
            }).error(function(data, status) {               
              $scope.status = status; 
              console.log($scope.status) //returns 404
            });

      console.log($scope.status) //returns undefined??
teddybear123
  • 2,314
  • 6
  • 24
  • 38

0 Answers0