【问题标题】:Pagination: change page display (angular2)分页:改变页面显示(angular2)
【发布时间】:2018-10-08 03:48:15
【问题描述】:

我正在为 [00:00,00:06,...] 的小时列表实现分页。我正在使用 NgxPaginationModule。我每页的项目将是固定的,但我希望有 [0h-2h,2h-4h,....],而不是页面的 [1,2,3,...]。

            <div  class=" pagination  justify-content-center">
            <pagination-controls
              [id]="config2.id"
              [maxSize]="maxSize2"
              [directionLinks]="directionLinks2"
              [autoHide]="autoHide2"
              [previousLabel]="labels2.previousLabel | translate"
              [nextLabel]="labels2.nextLabel | translate"
              [screenReaderPaginationLabel]="labels2.screenReaderPaginationLabel"
              [screenReaderPageLabel]="associatePagination6minPage(labels2.screenReaderPageLabel)"
              [screenReaderCurrentLabel]="labels2.screenReaderCurrentLabel"
              (pageChange)="pagination2.onPageChange($event)"></pagination-controls>


          </div>

【问题讨论】:

标签: angular pagination


【解决方案1】:

来自自述文件

如果您需要更自定义的控件集,则需要使用PaginationControlsDirective 并实现您自己的组件。

所以这基本上意味着创建您自己的使用pagination-template 的组件并添加您自己的实现。

您可以查看默认分页 componenttemplate 并尝试推出自己的分页。

祝你好运。

【讨论】:

    猜你喜欢
    • 2013-02-21
    • 1970-01-01
    • 2015-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多