[英]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.