-
+
+
`
})
export class TemplateDoc {
- first: number = 0;
+ first1: number = 0;
+
+ rows1: number = 10;
+
+ first2: number = 0;
+
+ rows2: number = 10;
- rows: number = 1;
+ first3: number = 0;
+
+ rows3: number = 10;
totalRecords: number = 120;
@@ -44,27 +83,37 @@ export class TemplateDoc {
{ label: 120, value: 120 }
];
- onPageChange(event: PageEvent) {
- this.first = event.first;
- this.rows = event.rows;
+ onPageChange1(event: PageEvent) {
+ this.first1 = event.first;
+ this.rows1 = event.rows;
+ }
+
+ onPageChange2(event: PageEvent) {
+ this.first2 = event.first;
+ this.rows2 = event.rows;
+ }
+
+ onPageChange3(event: PageEvent) {
+ this.first3 = event.first;
+ this.rows3 = event.rows;
}
code: Code = {
basic: `
@@ -72,46 +121,49 @@ export class TemplateDoc {
`,
- html: `
-
+ html: `
`,
- typescript: `
-import { Component } from '@angular/core';
-
+ typescript: `import { Component } from '@angular/core';
+import { PaginatorModule } from 'primeng/paginator';
+import { ButtonModule } from 'primeng/button';
+import { DividerModule } from 'primeng/divider';
+import { SliderModule } from 'primeng/slider';
+import { FormsModule } from '@angular/forms';
+
interface PageEvent {
first: number;
rows: number;
@@ -121,7 +173,9 @@ interface PageEvent {
@Component({
selector: 'paginator-template-demo',
- templateUrl: './paginator-template-demo.html'
+ templateUrl: './paginator-template-demo.html',
+ standalone: true,
+ imports: [PaginatorModule, ButtonModule, DividerModule, SliderModule, FormsModule]
})
export class PaginatorTemplateDemo {
first1: number = 0;