试图在桌子上实施分页.但是Uib-pagination没有显示,但元素能够检查gui.
我哪里错了
调节器
//all rows to display on main page from build_req table
$scope.allrows = function() { //need to enable this
service.getAllBulidReqData().then(function(response) {
if (response.status == "success") {
$scope.rowcollection = response.data;
outsidescope();
} else {
location.path("/")
}
})
}
$scope.allrows();
//Pagination for table
function outsidescope() {
// console.log($scope.rowcollection)
$scope.totalItems = $scope.rowcollection.length;
$scope.itemsPerPage = 1
$scope.currentPage = 1;
$scope.pageCount = function() {
return Math.ceil($scope.rowcollection.length / $scope.itemsPerPage);
};
$scope.$watch('currentPage + itemsPerPage', function() {
var begin = (($scope.currentPage - 1) * $scope.itemsPerPage),
end …Run Code Online (Sandbox Code Playgroud)