打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
AngularJs--angular-pagination可复用的分页指令

1、angular-pagination

是基于angular 编写的可复用分页指令

安装

克隆项目到本地:

git clone https://github.com/febobo/angular-pagination.git

要跑demo环境要求: 

node , bower , npm , gulp

安装: npm install && bower install

运行: gulp serve

demo用法

html

1 <body ng-app="demo" ng-controller="demoCtro" class="row text-center">2     <div ui-pagination conf="conf"></div>3 </body>

JS

 1 var app = angular.module('demo' , ['pagination']); 2  3   app.controller('demoCtro' , function($scope){ 4  5       $scope.title = 'pagination-directive'; 6  7       $scope.conf = { 8  9         // 总条数10         total : 1190,11 12         // 当前页13         currentPage : 1,14 15         // 一页展示多少条16         itemPageLimit : 1,17 18         // 是否显示一页选择多少条19         isSelectPage : false,20 21         // 是否显示快速跳转22         isLinkPage : false23       }24 25       // 监控你的页码 , 发生改变既请求26       $scope.$watch('conf.currentPage + conf.itemPageLimit' , function(news){27          // 把你的http请求放到这里28          console.log($scope.conf.currentPage , $scope.conf.itemPageLimit)29       })30   })

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
20 个 jQuery 分页插件和教程,附带实例
angular
转easyui datagrid 前台分页的实现
AngularJS入门 & 分页 & CRUD示例
关于 AngularJS 框架的使用有哪些经验值得分享? |
Angular Input格式化
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服