2
我想了幾個小時弄清楚爲什麼我的md-data-table只排序當前頁面。
搜索過濾器上正在發生同樣的事情。
有人可以說爲什麼它這樣做,我該如何解決它?只排序當前頁面md-data-table
<input ng-model="searchInterview">
<md-table-container>
<table md-table="" md-progress="promise" ng-model="selected">
<thead md-head md-order="sort.order">
<tr md-row>
<th md-column md-order-by="dataapplicazione"><span>Data app</span></th>
<th md-column md-order-by="nomecognome"><span>Nome e cognome</span></th>
</tr>
</thead>
<tbody md-body>
<tr md-row ng-repeat="item in main.interviewsList | limitTo: sort.limit : (sort.page -1) * sort.limit | orderBy:sort.order | filter:searchInterview ">
<td md-cell>{{ item.dataapplicazione | date}}</td>
<td md-cell>{{ item.nomecognome }}</td>
</tbody>
</table>
</md-table-container>
<md-table-pagination md-limit="sort.limit" md-limit-options="limitOptions" md-page="sort.page" md-total="{{main.interviewsList.length}}" md-on-paginate="promiseInterviews" md-page-select></md-table-pagination>
排序說明 排序升序
耶穌是這樣的。我改變了這個'|的順序orderBy |過濾器| limitTo'和它的作品。我想爲這個浪費時間制動一些東西!謝謝你的方式^ _^ –
^^不客氣!我很高興它的工作 – user7398648