How to do paging in AngularJS?

后端 未结 21 2341
轮回少年
轮回少年 2020-11-22 07:17

I have a dataset of about 1000 items in-memory and am attempting to create a pager for this dataset, but I\'m not sure on how to do this.

I\'m using a custom filter

21条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 08:05

    The jQuery Mobile angular adapter has a paging filter you could base off of.

    Here's a demo fiddle that uses it (add more than 5 items and it becomes paged): http://jsfiddle.net/tigbro/Du2DY/

    Here's the source: https://github.com/tigbro/jquery-mobile-angular-adapter/blob/master/src/main/webapp/utils/paging.js

提交回复
热议问题