錶行的$指數的號碼,我怎樣才能在JS(angularjs)獲得在angularjs
<tr ng-hide="group.$hideRows" ng-repeat="customer in group.data>
<td>({{$index + 1}}) </td> // << get this number ???
<td>{{customer.name}}</td>
<td>{{customer.city}}</td>
<td>{{customer.tel}}</td>
<td>{{customer.etc}}</td>
<td>{{customer.reg}}</td>
</tr>
該指數於我而言是指數從下面的示例中的數量。但是我怎樣才能將這個值作爲變量在其他函數中使用?
我$index.length
等嘗試過,但如果我正確認識的問題,我沒有得到價值10
你能發佈你想使用$ index的代碼? –
你可以用你想做的事情創建一個簡單的小提琴/小提琴嗎? – glepretre