問題があります。アルファベット順の表データをAngular.js dir-paginate
で並べ替えることはできません。現在のページのソートデータ。私は以下のコードを説明しています。この場合Angular.jsでページ区切りを使用しているときに表データをアルファベット順にソートできない
<tbody id="detailsstockid">
<tr dir-paginate="cus in ($parent.labelResults=(listOfCustomerData | filter:searchProduct.rest_name)) | itemsPerPage:5 | orderBy:'rest_name' track by $index" current-page="currentPage">
<td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
<td>{{cus.rest_name}}</td>
<td>{{cus.quadrant_name}}</td>
<td>{{cus.city}}</td>
<td>{{cus.proviance}}</td>
<td>{{cus.person}}</td>
<td>{{cus.mobile}}</td>
<td>{{cus.url}}</td>
<td ng-if="cus.status==1">Active</td>
<td ng-if="cus.status==0">Inactive</td>
<td ng-if="cus.premium==1">Yes</td>
<td ng-if="cus.premium==0">No</td>
<td >
<a ui-sref="dashboard.customer.view">
<input type='button' class='btn btn-xs btn-green' value='Edit' ng-click="editProductViewData(cus.member_id);">
</a>
</td>
<td>
<a ui-sref="dashboard.customer.view">
<input type='button' class='btn btn-xs btn-red' value='Delete' ng-click="deleteProductInfoData(cus.member_id);" >
</a>
</td>
</tr>
</tbody>
私は、現在のページのみのデータを並べ替えることができますが、私は.Iは、以下の私の出力を添付しています合計配列(i.e-listOfCustomerData
)からのデータをソートする必要があります。
2ページのためにレストランの名前は、私は、すべてのレストランでは、アルファベット順で並べ替えが、page.Pleaseごとに私を助けてはならない必要above.Hereを与えられているBから始めています。
ページを変更する前にソートを試しましたか? 'orderBy: 'rest_name' | itemsPerPage:5 |の代わりに 'itemsPerPage:5'を使用します。 orderBy: 'rest_name'' –
私にそれをさせてください。 – satya
@DanielBeck:はい、それは働き始めました。ありがとうございます。 – satya