i lave an ionic list
<ion-list>
<ion-item ng-repeat="item in items">
Hello, {{item.name}}!
</ion-item>
</ion-list>
then, in the controller i have a event:
$scope.items = someData();
itemsRef.on('event', function (response) {
console.log(response); // this is an object containing he "name" property
});
i would like append the response as a ion-item, without inserting html, but somehow adding the response to the items
I’ve tried: $scope.items .push(response);
but weirdly enough i get Uncaught TypeError: undefined is not a function
edit: it looks like one doesn’t just $scope.items.push(response);
, but $scope.items[next_key_here] = response;