javascript - 如何在 ng-Table 中隐藏页面切片?

标签 javascript angularjs ngtable

我找不到在我的 ng-Table 上隐藏页面切片的方法。在网上到处找,最后只好来这里。

enter image description here

请告诉我如何做?

这是我的代码:

JS:

var applicationList = jsonResponse.entity.dashboardApplicationList;

                     $scope.applicationsTable = new ngTableParams({
                        page: 1,
                        count: 3,
                        noPager: true 
                     }, {
                        total: applicationList.length, 
                        getData: function ($defer, params) {
                            $scope.data = params.sorting() ? $filter('orderBy')(applicationList, params.orderBy()) : applicationList;
                            $scope.data = $scope.data.slice((params.page() - 1) * params.count(), params.page() * params.count());
                            $defer.resolve($scope.data);
                        }
                     });

HTML:

<table ng-table="applicationsTable" class="table table-striped back-silver-pointer table-dark" show-filter="applicationsTable">
                    <tbody class="back-light-blue font-weight-500 back-trans-imp text-white">
                        <tr ng-repeat="application in data" class="back-trans-imp">
                            <td data-title="'Status'" 
                                class="text-center no-padding-left-imp no-border-top-imp" sortable="'status'" ng-click="showApplication(application)"
                                ng-attr-title="{{getApplicationStatusName(application.status)}}">
                                <span class="application-status-smaller" 
                                ng-class="application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_COMPLETED.code ? 'status_completed' : 
                                          application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SIGNED.code ? 'status_signed' :
                                          application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SUBMITTED.code ? 'status_submitted' :
                                          application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SAVED.code ? 'status_saved' : ''"></span>
                                <br>
                                <span class="font10 disp-block line-height-per50 text-capitalize">
                                    {{(application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_COMPLETED.code ? AppConstants.MOBIBRANCH_APPLICATION_STATUS_COMPLETED.name : 
                                      application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SIGNED.code ? AppConstants.MOBIBRANCH_APPLICATION_STATUS_SIGNED.name :
                                      application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SUBMITTED.code ? AppConstants.MOBIBRANCH_APPLICATION_STATUS_SUBMITTED.name :
                                      application.status == AppConstants.MOBIBRANCH_APPLICATION_STATUS_SAVED.code ? AppConstants.MOBIBRANCH_APPLICATION_STATUS_SAVED.name : 'unknown').toLowerCase();}}
                                </span>
                                </td>
                            <td data-title="'Product Type'" 
                                class="text-bold vertical-align-middle no-border-top-imp"
                                sortable="'applicantFullName'" ng-click="showApplication(application)">{{application.applicantFullName}}</td>
                            <td data-title="'Creation'" ng-click="showApplication(application)"
                                class="text-center min-width-10em vertical-align-middle no-border-top-imp"
                                sortable="'createTime'">{{application.createTime | date:'dd MMM yyyy'}}</td>
                        </tr>
                    </tbody>
                </table>

最佳答案

new ngTableParams({
      page: 1,
      count: 3,
      noPager: true,
      counts: [] 
}

关于javascript - 如何在 ng-Table 中隐藏页面切片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41497532/

相关文章:

Javascript/CSS float 标签

javascript - Canvas - 裁剪多个图像

javascript - Flick IMG src 属性来模拟眨眼

javascript - 在 Angular Controller 中重新渲染 ng-table

javascript - 使用嵌套 json 时,排序在 ngTable 中不起作用

javascript - ngTables 中的 Angular 自定义过滤

javascript - 如何清除和休息实心边框

javascript - ng-click 用 Angular Directive(指令)替换 DOM 元素

javascript - 如果 ng-model 为空,如何为其赋值

javascript - 当我动态更改 html 时,ng-bind-html 中的 ng-click 不触发