Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 594
mlim1972 Avatar asked Dec 14 '25 05:12

mlim1972


1 Answers

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

like image 107
pkozlowski.opensource Avatar answered Dec 16 '25 00:12

pkozlowski.opensource