a angular pagenav directive.
angular.module('ctrl', [
'zPagenav'
])
.controller('cl', function Cl() {
this.page = 1
this.pageSize = 20
this.total = 500
this.opts = {
maxLinkShow: 5
,lang: {
page: 'page'
,afterCurrentPage: ', '
,intotal: 'in total'
,Prev: 'Prev'
,Next: 'Next'
,more:'...'
}
,url: opts.url || 'javascript:;'
,pageParam: opts.pageParam || 'p'
,noFirstPageParam: opts.noFirstPageParam || false
,ngClick: true
}
})
.pagenav-desc {
display: none;
}
.pagenav-total {
padding: 6px 12px;
color: #008000;
display: inline-block;
}
.pagenav-link {
padding: 6px 12px;
display: inline-block;
color: #999;
border: 1px solid #ddd;
background: #fff;
}
.pagenav-link:hover {
background: #337ab7;
color: #fff;
}
.pagenav-link:first-child {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.pagenav-link:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.pagenav-more {
padding: 6px 12px;
display: inline-block;
color: #ddd;
border: 1px solid #ddd;
background: #fff;
}
.pagenav-current-link {
color: #fff;
padding: 6px 12px;
display: inline-block;
background: #337ab7;
border: 1px solid #337ab7;
}
.only-one-page {
display: none;
}