Access index of the parent ng-repeat from child ng-repeat

后端 未结 6 714
不思量自难忘°
不思量自难忘° 2020-11-28 19:43

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 $par

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 20:03

    You can also get control of grand parent index by the following code

    $parent.$parent.$index
    

提交回复
热议问题