nested ng-repeat $parent.$index and $index
I have a strange bug that, unfortunately, I cannot replicate with jsfiddle. I've commented out my entire code (Except libraries,etc) except for the following snippets. Is there something obvious that I don't understand? Any ideas? This works and prints: (0,0) (0,1) (1,0) (1,1) <div ng-repeat="i in list"> <div ng-repeat="j in list2"> <div> ({{$parent.$index}} {{$index}}) </div> </div> </div> However, this piece of code prints: (0,0) (1,1) (0,0) (1,1) <div ng-repeat="i in list"> <div ng-repeat="j in list2"> <div ng-if="1"> ({{$parent.$index}} {{$index}}) </div> </div> </div> My controller is: