In my code, I have a nested ng-repeat structure with an ng-include inside the inner ng-repeat. I am trying to access the outer ng-repeat using $parent within the ng-include. Here is an example of what I am working on:
index.html
<div ng-repeat="population in populations">
<div ng-repeat="person in population">
<div ng-include="person.url"></div>
</div>
</div>
one_person.html ("person.url" points to this file)
<div> Your population id is {{ $parent.$index }}</div>
However, I am facing an issue where I cannot access $parent.$index
from within the ng-include
.