angularJS中的分页问题

angularJS中的分页问题,angularjs,pagination,Angularjs,Pagination,我在分页方面有问题,我没有看到使用此代码进行ma分页的按钮(1,2,3…) <div ng-controller="PaginationDemoCtrl"> <table class="table"> <tr ng-repeat="row in data.slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage))"> <td>{{

我在分页方面有问题,我没有看到使用此代码进行ma分页的按钮(1,2,3…)

    <div ng-controller="PaginationDemoCtrl">
    <table class="table">
      <tr ng-repeat="row in data.slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage))">
        <td>{{row.name}}</td>
        <td>{{row.id}}</td>
      </tr>
    </table>
          <select ng-model="viewby" ng-change="setItemsPerPage(viewby)">
    <option>3</option>
    <option>5</option>
    <option>10</option>
    <option>20</option>
    <option>30</option>
    <option>40</option>
    <option>50</option>
          </select>

    <pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" class="pagination-sm" items-per-page="itemsPerPage"></pagination>
    <pre>The selected page no: {{currentPage}}</pre>
    <button class="btn btn-info" ng-click="setPage(3)">Set current page to: 3</button>

    <hr />
    <h4>Pager</h4>
    <pager total-items="totalItems" ng-model="currentPage" items-per-page="itemsPerPage"></pager>

    <hr />
    <h4>Limit the maximum visible buttons</h4>
    <pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" items-per-page="itemsPerPage"></pagination>
    <pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" rotate="false" num-pages="numPages" items-per-page="itemsPerPage"></pagination>
    <pre>Page: {{currentPage}} / {{numPages}}</pre>
  </div>

{{row.name}
{{row.id}}
3.
5.
10
20
30
40
50
所选页面编号:{currentPage}
将当前页面设置为:3

传呼机
限制最大可见按钮数 页码:{{currentPage}/{{numPages}
我不明白为什么

我共用一张桌子,这是第二张桌子的

如果有人能帮助我,请


提前感谢

使用
uib分页
而不是
分页
。此外,该指令仅作为属性而不是元素适用。所以,你应该考虑这样做:

    他有一个很好的例子

    <ul uib-pagination total-items="totalItems" 
      ng-model="currentPage" max-size="maxSize" 
      class="pagination-sm" boundary-links="true" 
      items-per-page="itemsPerPage"></ul>