$scope.items = []; $scope.items.push(items); <div ng-repeat="item in items"> <div ng-repeat="(key, value) in item"> {{value.ItemId}} </div> </div>
How to avoid nested ng-repeat when iterating through an array of objects/arrays?
You shouldn't push one array into another, use angular.extend
$scope.items = []; angular.extend($scope.items, items); <div ng-repeat="(key, item) in items"> {{item.ItemId}} </div>
Why don't you use $resource
to get your items from the server?
$resource
returns a promise that can be assigned to your scope and will be populated with the data by Angular automatically.
var Items = $resource('/yourUrl');
After you implement your ajax call as a resource, you can simply do $scope.items = Items.query()
.
items
another array of items?