Javascript 嵌套ng重复$first和$last?
我有以下表格Javascript 嵌套ng重复$first和$last?,javascript,jquery,angularjs,Javascript,Jquery,Angularjs,我有以下表格 <tbody ng-repeat="attGroup in attributesGroups"> <tr> <td class="vcenter text-right"> <a href="javascript:" ng-click="!$last && updateGroupOrder(attGroup.id,'down')" titl
<tbody ng-repeat="attGroup in attributesGroups">
<tr>
<td class="vcenter text-right">
<a href="javascript:" ng-click="!$last && updateGroupOrder(attGroup.id,'down')" title="move down"><i class="entypo-down-open-big"></i></a>
<a href="javascript:" ng-click="!$first && updateGroupOrder(attGroup.id,'up')" title="move up"><i class="entypo-up-open-big"></i></a>
</td>
</tr>
<tr ng-repeat="att in attGroup.attributes">
<td class="vcenter text-right">
<a href="javascript:" ng-click="!$last && updateAttributeOrder(att.id,'down')" title="move down"><i class="entypo-down-open-big"></i></a>
<a href="javascript:" ng-click="!$first && updateAttributeOrder(att.id,'up')" title="move up"><i class="entypo-up-open-big"></i></a>
</td>
</tr>
您可以看到,我在attributesGroups ng repeat和attributesGroups.attributes ng repeat中都使用$last/$first。现在我的问题是,第二个$last和$first属于attributesGroups或attributesGroups。attributes?
$first/$last
取决于调用它的上下文
<tbody ng-repeat="attGroup in XXX">
<tr>
<!--- HERE $first/$last belongs to XXX --->
</tr>
<tr ng-repeat="att in YYY">
<!--- HERE $first/$last belongs to YYY --->
</tr>
</tbody>