Upgraded to Angular 1.62 and a working set of complex arrays stopped working and I get this error early in page load. I think I am loosing track of the $index?
$scope.purchaseList = vm.pq.purchaseItemsList;
vm.tabledataNew = [];
for (var i = 0; i < $scope.purchaseList.length; i++) {
vm.tabledataNew[i] = {};
var datat = $scope.purchaseList[i];
vm.tabledataNew[i].tableParams = new NgTableParams({
total: datat.mainProductAndAddons.length
}, {
dataset: datat.mainProductAndAddons
});
}
<div class="st-table pq-items" ng-repeat="itemgroup in purchaseList track by $index" ng-show="ctrl.showNoItems == false">
<table class="table" ng-table="ctrl.tabledataNew[$index].tableParams">
<tr ng-repeat="item in $data">
<td data-title="'Item'"sortable="'description'" class="first">{{::item.description}}</td>
<td data-title="'List Price'" sortable="'listPrice'">{{::item.listPrice | currency}}</td>
<td data-title="'Discount'" sortable="'discountAmount'">{{::item.discountAmount | currency}}</td>
<td data-title="'Final Price'" sortable="'finalPrice'">{{::item.finalPrice | currency}}</td>
<td class="last"></td>
</tr>
</table>
</div>