Angular ng-table 带转到页面

Angular ng-table with Goto page

我正在使用 ng-table 设置自定义分页控件。我想要一个只允许有效页码的输入。到目前为止我有现有的分页。

script(type="text/ng-template" id="ng-table-pagination-input")
  div(class="ng-cloak ng-table-pager" ng-if="params.data.length")
    br
    ul(ng-if="pages.length" class="pagination ng-table-pagination")
      li(ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type")
        a(ng-switch-when="prev" ng-click="params.page(page.number)" href="")
          span «
        a(ng-switch-when="next" ng-click="params.page(page.number)" href="")
          span »

如何让输入控件正常工作?

最终找到了神奇的 Angular 代码来完成这项工作。

<input ng-model="params.page" ng-model-options="{getterSetter: true}" />