<div class="">
<table class="table">
<thead class="hed">
<tr>
<th>省份1</th>
<th>省份2</th>
<th>省份3</th>
<th>省份4</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="a in allitem[currentPage-1]">
<td ng-bind="a.n"></td>
<td ng-bind="a.s"></td>
<td ng-bind="a.n"></td>
<td ng-bind="a.s"></td>
</tr>
</tbody>
</table>
</div>
<div class="">
<pagination boundary-links="true" total-items="totalItems"
ng-model="currentPage" class="pagination-sm embed-responsive-item"
previous-text="上一页"
next-text="下一页"
first-text="首页"
last-text="尾页"
max-size="maxSize"
rotate="false" num-pages="numPages">
</pagination>
</div>
$scope.currentPage =1;//初始当前页
$scope.maxSize = 3;//最多显示3页其他的用···代替
$scope.allitem=[];//存放所有页
$http.get('./js/test').success(
function (data) {
$scope.addr=data.l;
var num= $scope.addr.length;
$scope.totalItems =num;//共有多少条数据
for(var i=0;i<num;i+=10){
$scope.allitem.push($scope.addr.slice(i,i+10))
}//此方法可以将一个数组分成多个数组并且放在了一个大数组里面,按每个数组10条数据【因为组件默认为10条数据一页】存放,假如41条数据的话我们将分成5页
}
);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有