gpt4 book ai didi

css - https ://angular-ui. github.io/bootstrap/#/pagination 类 ="pagination pagination-lg"在 bootstrap 4 中不工作

转载 作者:行者123 更新时间:2023-11-28 05:23:44 28 4
gpt4 key购买 nike

我是 angularjs 的新手。我正在使用 https://angular-ui.github.io/bootstrap/#/pagination .我有一些问题:style class="pagination pagination-lg"不工作,我正在使用 bootstrap 版本 4。帮助我。谢谢

error image here

index.html

<div>
<pre>You are currently on page {{userCtrl.page}}</pre>
<ul uib-pagination total-items="userCtrl.totalElements" ng-model="userCtrl.page" max-size="10000" class="pagination pagination-lg"
boundary-links="true" num-pages="userCtrl.totalPages">
</ul>
</div>

userController.js

module.exports = function (UserService) {
var _this = this;
_this.users = [];
_this.page = [];
_this.size = [];
_this.totalElements = [];
_this.totalPages = [];

_this.list = function () {
UserService.getUsersPage().then(function (response) {
console.log(response);
_this.users = response.content;
_this.page = response.number;
_this.size = response.numberOfElements;
_this.totalElements = response.totalElements;
_this.totalPages = response.totalPages;
})
};
_this.list();
};

最佳答案

你检查过分页组件的 DOM 结构了吗? uiBootstrap 使用 3.3.6 版本进行测试,因此比较两个版本:

v3:

<nav aria-label="Page navigation">
<ul class="pagination">
<li>
<a href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li>
<a href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
</ul>
</nav>

v4:

<nav aria-label="Page navigation">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">4</a></li>
<li class="page-item"><a class="page-link" href="#">5</a></li>
<li class="page-item">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</nav>

我确定您在 v3 中看到元素上缺少 css 类 ;)

关于css - https ://angular-ui. github.io/bootstrap/#/pagination 类 ="pagination pagination-lg"在 bootstrap 4 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38917535/

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