角引导UI分页:页面数量可以定制? [英] Angular Bootstrap UI pagination: Can the page number be customize?

查看:124
本文介绍了角引导UI分页:页面数量可以定制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否有定制的UI分页显示的数字的方式。原因是,如果我HAA大量的页面,我想改变的页码有一个...。今天,部件将把尽可能多的网页,因为被设置;这样的数量设定为50将具有如图50的页面。

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.

推荐答案

假设我们正在谈论从的 http://angular-ui.github.io/bootstrap/#/pagination 你可以限制使用最大尺寸的分页显示的页面数属性:

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>

下面是一个工作普拉克: http://plnkr.co/edit/MKev5wMtu3C5VMq83uFp p = preVIEW

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

这篇关于角引导UI分页:页面数量可以定制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆