-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
古老的andularjs分页 #40
Comments
在项目中使用分页,我使用的是 找到了自作者项目地址 |
使用如下所示 <link rel="stylesheet" href="lib/pagination/css/pagination.css" />
<script src="lib/pagination/js/tm.pagination.min.js"></script> |
在你需要使用它的地方这样使用 <tm-pagination conf="paginationConf"></tm-pagination> |
在你的项目 // 记住一定要注册插件
angular.module('you project name', ['tm.pagination'] ) {} |
然后去使用 $scope.paginationConf = {
currentPage: $location.search().currentPage ? $location.search().currentPage : 1,
totalItems: 8000,
itemsPerPage: 15,
pagesLength: 15,
perPageOptions: [10, 20, 30, 40, 50],
onChange: function() {
console.log($scope.paginationConf.currentPage);
$location.search('currentPage', $scope.paginationConf.currentPage);
}
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
今天在处理一个
angularjs
项目时,遇到了一个古老的bug,现记录下The text was updated successfully, but these errors were encountered: