单击页上更改隐藏隐藏页号[目录]

时间:2018-11-19 08:24:39

标签: angular dirpagination

在处理分页时遇到麻烦。当我单击页码时,页码消失。我不太确定自己做错了什么。这是示例代码。

script.js

$scope.itemsperpage = 0;
$scope.pageSize = 10;
$scope.totalItems = 50;

$scope.pageChanged = function (newPage) {
        getResultsPage(newPage);
    };
    function getResultsPage(pageNumber) {
        $scope.itemsperpage = (pageNumber - 1) * $scope.pageSize;
}

table.html

<tbody>
  <tr dir-paginate="info in userlogs | filter:search | itemsPerPage:pageSize"
			total-items="totalItems" current-page="pagination.current">
	  <td class="text-left">{{info.DateTimeIN | nohtmlencode | trapdot}}</td>
  </tr>
</tbody>
<div class="row" ng-hide="!(userlogs | filter:search).length">
  <div class="col-md-12">
	  <dir-pagination-controls
			  boundary-links="true"
			  on-page-change="pageChanged(newPageNumber)"
			  auto-hide="true"
			  template-url="bower_components/dirPagination.tpl.html">
	  </dir-pagination-controls>
  </div>
</div>

0 个答案:

没有答案