[英]Cant hide items per page and pagination in datatable when less then number displayed
[英]How to hide the pagination bar if the number of pages is less than the number of items per page in angular
當要渲染的頁面數小於每頁項目數時,我試圖隱藏分頁欄。 我嘗試了ng-show,但是沒有用。
<tr ng-repeat="row in allItems">
<td>{{ row.Name }}</td>
<td>{{ row.Email }}</td>
<td>{{ row.Phone }}</td>
</tr>
</tbody>
<tfoot ng-show="allItems.length > itemsPerPage">
<tr>
<td></td>
<td></td>
<td st-pagination="" st-items-by-page="itemsPerPage" st-template="/example/pagination.html" >
</td>
</tr>
</tfoot>
嘗試在條件周圍加上括號,例如ng-show="(allItems.length>itemsPerPage)
問題是我提到了錯誤的標簽。 這就是我定義表的方式:
<table id = "table" st-safe-src="data" st-table="allItems">
當我試圖隱藏表格頁腳時,我應該寫:
<tfoot ng-show="data.length > itemsPerPage">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.