html - Using an index with ng-table over multiple pages -


i using ng-table display below data.

i want first column index number persists on pages (eg page rows 100-199 should have index 100-199).

currently index resets , starts @ 0 every page. have tried

{{ (farmparams.page() * farmparams.count()) + index }} 

but first page start @ index 100 in case.

<table ng-table="vm.farmparams" class="table table-hover"> <tr ng-repeat="row in $data">     <td data-title="''" filter="{index : 'text'}" sortable="'index'">{{$index}}</td>     <td data-title="'planted:'" filter="{planted : 'text'}" sortable="'planted'">{{row.planted}}</td>     <td data-title="'harvested'" filter="{harvested: 'text'}" sortable="'harvested'">{{row.harvested}} </td> </tr> </table> 

seems subtract 1 page then.

{{ ((farmparams.page() - 1) * farmparams.count()) + index }} 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -