我可以有两个ng-repeat,两个“按索引追踪”。例如:
<div ng-repeat="car in cars track by $index">
<div ng-repeat="wheel in car track by $index">
</div>
</div>
第一个是$ index,它是否在第二次重复?
答案 0 :(得分:5)
你可以这样做而不是
<div ng-repeat="(carIndex,car) in cars">
<div ng-repeat="(wheelIndex,wheel) in car">
</div>
</div>