title: AngularJS $http get data object displays status code instead of response
body: <p>I have mulled over this for days and can still not figure out what I'm doing incorrectly so any ideas or even shots in the dark are appreciated. I am trying to display the response from a rest service to the user using the using the AngularJS $http get method, but when I print the data object to the console, I consistently receive the number 200 (I'm fairly certain it is giving me the status code). I hit success every time and, upon sending the request, the Chrome debug tool shows me the response with all the correct data. I just can't seem to get it to appear in a variable for display. Let me know if you think of anything! Thanks!</p>
  
  <p>My javascript:</p>
  
  <pre><code>$scope.resendDestinations = [];
  $scope.resendDestGet = function () {
      var omtTypeCodeString = '';
  
      for(var i = 0; i &lt; $scope.mySelections.length; i++){
          if(omtTypeCodeString == ''){
              omtTypeCodeString = $scope.mySelections[i].orderHeader.omtOrderTypeCode;
          }
          else{
              omtTypeCodeString = omtTypeCodeString + ',' + $scope.mySelections[i].orderHeader.omtOrderTypeCode;
          }
      }
  
      $http({
          method: 'GET',
          url: restService.pom + //service url,
          respondType: 'json',
          headers: {
               'Accept': 'application/json',
               'Content-Type': 'application/json',
               'Access-Control-Allow-Credentials': true
          },
          params: {
              orderTypeCode: omtTypeCodeString,
              transactionCode: 3
              }
          }).success(function (status, data, response, header) {
              console.log("Success!");
              //TODO see if this is being used... has to be
              status = parseInt(status);
              $scope.resendDestinations = data.multipleOrders;
              if (status == 200 &amp;&amp; $scope.resendDestinations.length == 0) {
                  $scope.bigAlert.title = 'Error',
                  $scope.bigAlert.header = 'Search Error';
                  $scope.bigAlert.content = 'Current search parameters do not match any results.';
                  $scope.showBigAlert();
              }
              else{
                  $scope.resendDestinations = data;
                  console.log("Data DestinationList here: ");
                  console.log($scope.resendDestinations);
                  console.log(data.multipleOrders);
                  console.log(data);
              }
              $scope.isSearching = false;
          }).error(function (response, data, status, header) {
             //Do error things
          });
      return $scope.resendDestinations;
  };
  </code></pre>
  
  <p>And the service response:</p>
  
  <p><code>
  [{"destCode":3,"destDescr":"Repository","attributes":null},{"destCode":4,"destDescr":"Pipeline","attributes":null},{"destCode":1,"destDescr":"Processor","attributes":null},{"destCode":2,"destDescr":"DEW","attributes":null},
  {"destCode":7,"destDescr":"Management System","attributes":null},
  {"destCode":8,"destDescr":"Source","attributes":null}]</code></p>