Is it possible to affect a unique Id to a div located inside two ng-repeat directives? See bellow example:
<!--data: [[{id: 'A'},{id: 'B'},{id: 'C'}], [{id: 'X'},{id: 'Y'}]]-->
<div ng-repeat = "item in data">
<div ng-repeat = "sub-item in item">
<div id = "{{$index}}">
</div>
</div>
expected output:
<!--first ng-repeat-->
<div id = "1">
<div id = "2">
<div id = "3">
<div id = "4"> <!--start second array-->
<div id = "5">
Not:
<div id = "1">
<div id = "2">
<div id = "3">
<div id = "1"> <!--start second array-->
<div id = "2">
Update: I don't think track by or $parent.$index will work for this use case, obviously we have to calculate the length of each sub-array in order to get exact incremented counter. I'm currently trying a combination of two ng-init. I will update the post once I get something working