gpt4 book ai didi

angular-ui-bootstrap - 如何对表格使用角度引导 ui 分页?

转载 作者:行者123 更新时间:2023-12-02 04:37:55 28 4
gpt4 key购买 nike

我想使用 angular-botstrap-ui在我的申请中。但我不知道如何构建分页。

假设我在表中有 100 条记录,我想在表行中获取 10 个结果。通过使用 ng-repeat 我得到 100 行,但我想使用分页来限制它们。我怎样才能做到这一点?

最佳答案

我已经使用数组函数 slice 解决了这个问题

ng-repeat="row in queryResult.rows.slice(((currentPage-1)*10), ((currentPage)*10))"

我已经写了一篇关于我的巧妙解决方案的博文 here

关于angular-ui-bootstrap - 如何对表格使用角度引导 ui 分页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21554962/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com