在为ngx-datatable(https://github.com/swimlane/ngx-datatable)创建自定义页脚模板时,我不想在每个使用数据表的页面中都重复页脚模板。
如何创建可在所有数据表中使用的可重用模板的angular2方法是什么?
<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>
Displaying {{((offset * pageSize) + 1).toLocaleString()}}-{{lastItemOffset().toLocaleString()}}
of {{rowCount.toLocaleString()}} entries
</div>
<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>