42
rated 0 times
[
47]
[
5]
/ answers: 1 / hits: 146423
/ 12 Years ago, mon, february 11, 2013, 12:00:00
I want to use the index of the parent list (foos) as an argument to a function call in the child list (foos.bars).
I found a post where someone recommends using $parent.$index, but $index
is not a property of $parent
.
How can I access the index of the parent ng-repeat
?
<div ng-repeat=f in foos>
<div>
<div ng-repeat=b in foos.bars>
<a ng-click=addSomething($parent.$index)>Add Something</a>
</div>
</div>
</div>
More From » angularjs