1. 当两层ng-repeat都需要$index时, 使用ng-init重命名
<div ng-repeat="item in data" ng-init="$num = $index"> <div ng-repeat="value in data[$num] track by $index"> <span>{{value}}</span> </div> </div>
2.
1. 当两层ng-repeat都需要$index时, 使用ng-init重命名
<div ng-repeat="item in data" ng-init="$num = $index"> <div ng-repeat="value in data[$num] track by $index"> <span>{{value}}</span> </div> </div>
2.
转载于:https://www.cnblogs.com/floraCnblogs/p/angular-question.html