分页没有显示在屏幕上 [英] Pagination is not showing up on screen
问题描述
试图在表格上实现分页.但是 Uib-pagination 不显示但元素能够在 gui 上检查.
我哪里错了
控制器
//build_req 表中显示在主页面上的所有行$scope.allrows = function() {//需要开启这个service.getAllBulidReqData().then(function(response) {如果(响应.状态==成功"){$scope.rowcollection = response.data;外部作用域();} 别的 {location.path("/")}})}$scope.allrows();//表格分页函数外作用域(){//console.log($scope.rowcollection)$scope.totalItems = $scope.rowcollection.length;$scope.itemsPerPage = 1$scope.currentPage = 1;$scope.pageCount = function() {返回 Math.ceil($scope.rowcollection.length/$scope.itemsPerPage);};$scope.$watch('currentPage + itemsPerPage', function() {var begin = (($scope.currentPage - 1) * $scope.itemsPerPage),结束 = 开始 + $scope.itemsPerPage;$scope.rowcollection = $scope.rowcollection.slice(begin, end);});}
html
<table init-table="rowCollection" class="table table-striped table-hover table-bordered" ng-class="fulltable? 'full-width' : 'custom-width'" ><caption>所有请求<div class="pull-right"><button class="btn-sm btn-default btn-filter" ng-click="filtershow()"><span class="glyphicon glyphicon-filter" ></span>过滤器按钮>
<div class="form-group pull-right" style="margin-left :-350px;width:28%;margin-bottom:0px"><div class="input-group" ng-show="filter"><div class="input-group-addon" style="background-color: #428BCA;"><span class="fa fa-search" style="color:white;"></span>
<input type="text" class="col-sm-4 control-label" placeholder="你在找什么?需要 ng-model="搜索">