我一直在使用带有angular5的swimlane / ngx-datatbles。想要添加具有当前displayCount的新页脚。 https://github.com/swimlane/ngx-datatable
这是我想要的页脚: 显示总共25个中的10个
希望代码是这样的
Showing {{displayCount}} of {{rowCount.toLocaleString()}} total
此处有自定义页脚的示例:
<ngx-datatable-footer>
<ng-template ngx-datatable-footer-template let-rowCount="rowCount" let-pageSize="pageSize" let-selectedCount="selectedCount"
let-curPage="curPage" let-offset="offset" let-isVisible="isVisible">
<div style="margin: 10px">
<select class="form-control" style="width: 150px; font-size: 14px" (change)="onLimitChange($event.target.value)">
<option *ngFor="let option of pageLimitOptions" [value]="option.value" [selected]="option.value == pageSize">
{{ option.value }} per page
</option>
</select>
</div>
Showing {{displayCount}} of {{rowCount.toLocaleString()}} total
<datatable-pager [pagerLeftArrowIcon]="'datatable-icon-left'" [pagerRightArrowIcon]="'datatable-icon-right'" [pagerPreviousIcon]="'datatable-icon-prev'"
[pagerNextIcon]="'datatable-icon-skip'" [page]="curPage" [size]="pageSize" [count]="rowCount" [hidden]="false"
(change)="table.onFooterPage($event)">
</datatable-pager>
</ng-template>
</ngx-datatable-footer>
其他页脚示例:https://github.com/swimlane/ngx-datatable/issues/739
但是我没有办法获得显示计数。 有没有办法在最新/任何版本中执行此操作?