diff --git a/components/pagination/demo/item-render.ts b/components/pagination/demo/item-render.ts
index 974f9a80d6..a2e3c4ea21 100644
--- a/components/pagination/demo/item-render.ts
+++ b/components/pagination/demo/item-render.ts
@@ -5,13 +5,23 @@ import { Component } from '@angular/core';
template: `
-
- {{ page }}
- Previous
- Next
- <<
- >>
-
+ @switch (type) {
+ @case ('page') {
+ {{ page }}
+ }
+ @case ('prev') {
+ Previous
+ }
+ @case ('next') {
+ Next
+ }
+ @case ('prev_5') {
+ <<
+ }
+ @case ('next_5') {
+ >>
+ }
+ }
`
})
diff --git a/components/pagination/pagination-default.component.ts b/components/pagination/pagination-default.component.ts
index b6e73b30cd..8884393576 100644
--- a/components/pagination/pagination-default.component.ts
+++ b/components/pagination/pagination-default.component.ts
@@ -4,7 +4,7 @@
*/
import { Direction, Directionality } from '@angular/cdk/bidi';
-import { NgForOf, NgIf, NgTemplateOutlet } from '@angular/common';
+import { NgTemplateOutlet } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
@@ -41,44 +41,50 @@ import { PaginationItemRenderContext } from './pagination.types';
template: `
-
-
-
+ @if (showTotal) {
+
+ }
+
+ @for (page of listOfPageItem; track trackByPageItem) {
+
+ }
+
+ @if (showQuickJumper || showSizeChanger) {
+
+ }
`,
- imports: [NgTemplateOutlet, NgForOf, NgIf, NzPaginationItemComponent, NzPaginationOptionsComponent],
+ imports: [NgTemplateOutlet, NzPaginationItemComponent, NzPaginationOptionsComponent],
standalone: true
})
export class NzPaginationDefaultComponent implements OnChanges, OnDestroy, OnInit {
diff --git a/components/pagination/pagination-item.component.ts b/components/pagination/pagination-item.component.ts
index f6031dff3a..41e8575e24 100644
--- a/components/pagination/pagination-item.component.ts
+++ b/components/pagination/pagination-item.component.ts
@@ -18,7 +18,7 @@ import {
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzPaginationI18nInterface } from 'ng-zorro-antd/i18n';
import { PaginationItemRenderContext, PaginationItemType } from './pagination.types';
-import { NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet } from '@angular/common';
+import { NgTemplateOutlet } from '@angular/common';
import { NzIconModule } from 'ng-zorro-antd/icon';
@Component({
@@ -28,48 +28,62 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
-
- {{ page }}
-
-
-
-