0

The first $http's callback I used then(),

.then(function(response) {
    $scope.threadContent = response.data;
    console.log($scope.threadContent)
}

and I pushed the data in my second load of $http as below

.success(function(data) {
    $scope.threadContent.push(data); 
    console.log($scope.threadContent)
}

and in my chrome console I saw this enter image description here

How should I push it properly into the ng-repeat?

PSL
  • 123,204
  • 21
  • 253
  • 243
james lebron
  • 109
  • 1
  • 8
  • 1
    Can you let us know what the format of the returned data is in each case. Normally, the response has the http headers and such included, so in the second success function you would want to push data.data rather than data itself. But really, we can't answer without more information. – Beartums Dec 07 '14 at 06:50
  • 1
    Can you please clarify what you're expecting to happen? "[Javascript push array values into another array](http://stackoverflow.com/questions/4156101/javascript-push-array-values-into-another-array)" may have your answer. – Jonathan Lonowski Dec 07 '14 at 06:52
  • @JonathanLonowski thanks! it's not push a single item, it's more to merging 2 arrays, really thanks! – james lebron Dec 07 '14 at 07:06

0 Answers0