当要渲染的页数小于每页的项数时,我正在尝试隐藏分页栏。我尝试使用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>
答案 0 :(得分:0)
尝试在条件周围添加括号,例如ng-show="(allItems.length>itemsPerPage)
答案 1 :(得分:0)
问题是我提到了错误的标签。这就是我定义表格的方式:
<table id = "table" st-safe-src="data" st-table="allItems">
当我试图隐藏桌面页脚时,我应该写一下:
<tfoot ng-show="data.length > itemsPerPage">