mlim1972
mlim1972

Reputation: 248

Angular Bootstrap UI pagination: Can the page number be customize?

Wanted to know if there is a way to customize the numbers displayed in the pagination UI. The reason is that if I haa a large number of pages, I would like to change the page number to have a "...". Today, the widget will put as many pages as there are set; so setting the number to 50 will have 50 pages shown.

Upvotes: 3

Views: 12917

Answers (1)

pkozlowski.opensource
pkozlowski.opensource

Reputation: 117370

Assuming that we are talking about the pagination directive from http://angular-ui.github.io/bootstrap/#/pagination you can limit number of pages displayed in a pagination by using the max-size attribute:

<pagination num-pages="noOfPages" current-page="currentPage" max-size="maxSize"></pagination>

Here is a working plunk: http://plnkr.co/edit/MKev5wMtu3C5VMq83uFp?p=preview

Upvotes: 6

Related Questions