【问题标题】:Pagination table - Angular 2分页表 - Angular 2
【发布时间】:2018-07-01 04:15:39
【问题描述】:

我有一个有 200 行的 table,我想在不同的页面中显示它们(每页 10 个)

<table class="table table-striped table-condensed table-hover table-bordered pointer">
    <thead>
        <th>ID</th>
    </thead>
    <tbody>
       <tr *ngFor="let car of cars;let i = index">
          <td>{{car.ID}}</td>
      </tr>
   </tbody>
</table>

【问题讨论】:

    标签: html angular html-table


    【解决方案1】:

    这里有一个很好的解释,关于如何在 Angular 中实现分页:

    Angular 2/5 - Pagination Example with Logic like Google

    您可以在我创建的示例网站上查看我如何实现此功能的示例,您可以在我的 GitHub 存储库 here 获取完整的源代码。

    【讨论】:

      猜你喜欢
      • 2019-05-04
      • 2016-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 2018-02-13
      相关资源
      最近更新 更多