I have two nested ng-repeat and would like to access both the outer and inner indexes.
<div ng-repeat="column in columns" ng-init="columnIndex = $index">
<div ng-repeat="row in column" ng-init="rowIndex = $index">
<p ng-click="delete(column, row)">
Delete
</p>
</div>
</div>
Now, this works fine as long as the outers model isn't updated. Apparently, ng-init initializes the values only once so columnIndex and rowIndex will not be update accordingly if I delete one element on the page.
Is there an other way to keep track of the outer and inner index so the correct values can be passed to the delete function?