var $scope.notif holds this data:
In a popup, I want to view the different messages, so I used:
<ion-list><ion-item ng-repeat="n in notif">{{n.msg}}</ion-item></ion-list>
While message 1 and message 2 are there, there are also 3 empty list items, probably because the length of the data is 5 because of the msg, msg_titleand notif_type.
Example showing the empty list items here.
Can I somehow tell Angular repeat the length minus 3?
I've tried removing the 3 extra items in the object using:
for(var i=0; i<($scope.notif.length); i++) {
$scope.notifnew.push($scope.notif[i]);
}
But $scope.notifnew is now undefined...

$scope.notifis an object not an array.