I'm trying to push some JSON data into scope for list whiteout (after tap on load next items btw) to append on the and of the list (Using Ionic framework and infiniteScroll)
Could somebody tell me please, what i'm doing wrong and how to append new list items to the end?
Thanks for any advice.
JSON array example:
var fakeListData = [
{ "DATE" : testDateTimeFormated,
"NUMBER_OF_ALL_CALLS" : 25,
"RESULT_DONE" : 0,
"RESULT_NOT_INTERESTED" : 0,
"RESULT_NO_APP" : 0
},
{ "DATE" : testDateTimeFormated,
"NUMBER_OF_ALL_CALLS" : 0,
"RESULT_DONE" : 0,
"RESULT_NOT_INTERESTED" : 0,
"RESULT_NO_APP" : 0
}];
Item filling:
// Option one (throwing Chrome sendrequest error: TypeError: Converting circular structure to JSON)
$scope.listData.push(fakeListData);
// Option two (crash browser)
angular.forEach(fakeListData,function(item) {
$scope.listData.push(item);
});