<table class="table table-bordered">
<tr ng-repeat="x in AppliedJob">
<td>{{x.JobName}}</td>
<td> <span class="dropdown" ng-repeat="y in AppliedCenter| unique: 'Location' " ng-if="y.JobName==x.JobName">
{{$index+1}}){{y.Location}}
</span> </td></tr> </table>
上述代码的输出
1) Tester : 1)India 2)USA 3)Australia
2) Developer : 4)Japan 5)China
所需输出
1) Tester : 1)India 2)USA 3)Australia
2) Developer : 1)Japan 2)China
我想设置$Index
为1
.