ng-repeat创造自己的
$scope。
因此,对于内部ng-repeats,您可以访问
$parent.$index,其中
$parent是当前重复块的父作用域。
例如:
<ul ng-repeat="section in sections"> <li> {{section.name}} </li> <ul> <li ng-click="loadFromMenu($parent.$index)" ng-repeat="tutorial in section.tutorials"> {{tutorial.name}} </li> </ul></ul>Plunkr
http://plnkr.co/edit/hOfAldNevxKzZQlxFfBn?p=preview



