智能表使用分页角度

时间:2016-12-06 20:41:04

标签: javascript angularjs pagination smart-table

使用Angular智能表lib:

我只想在底部显示分页按钮。根据文档,看起来st-pagination指令在那里插入那些dom元素。但是,对我来说,它不起作用。以下是智能表文档提供的plunker:http://plnkr.co/edit/wzUHcc9PBF6tzH8iAEsn?p=preview

这是我的表格页脚代码:

<tfoot>
  <tr>
    <td colspan="5" class="text-center">
      <div st-items-by-page="10" st-pagination="">
      </div>
    </td>
  </tr>
</tfoot>

我一定是误会了。我知道你可以为分页添加自己的自定义模板。

以下是输出和调试器的屏幕截图: enter image description here

1 个答案:

答案 0 :(得分:0)

您应该只使用<td>标记。你不应该使用<div>标签。

<td colspan="5" class="text-center" st-items-by-page="10" st-pagination="">
</td>

NG

<td colspan="5" class="text-center">
  <div st-items-by-page="10" st-pagination="">
  </div>
</td>