Skip to content

Commit cb5150b

Browse files
authored
Merge pull request #3524 from IgniteUI/bpenkov/paginator-cleanup
2 parents 8f7eb62 + c06abc3 commit cb5150b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
1+
import { AfterViewInit, ChangeDetectorRef, Component, ViewChild } from '@angular/core';
22
import { IgxPaginatorComponent } from 'igniteui-angular';
33
import { DATA } from '../../data/product';
44

@@ -7,17 +7,14 @@ import { DATA } from '../../data/product';
77
styleUrls: ['./pagination-sample.component.scss'],
88
templateUrl: './pagination-sample.component.html'
99
})
10-
export class PaginationSampleComponent {
11-
10+
export class PaginationSampleComponent implements AfterViewInit {
1211
@ViewChild('paginator', { static: true }) public paginator!: IgxPaginatorComponent;
1312
public productData = DATA;
1413
public itemsPerPage = [3, 4, 5];
1514

16-
constructor(public cdr: ChangeDetectorRef) {
17-
}
15+
constructor(public cdr: ChangeDetectorRef) { }
1816

19-
// eslint-disable-next-line @angular-eslint/use-lifecycle-interface
20-
ngAfterViewInit() {
17+
public ngAfterViewInit() {
2118
this.cdr.detectChanges();
2219
}
2320

@@ -32,5 +29,4 @@ export class PaginationSampleComponent {
3229
public navigateToFirstPage() {
3330
this.paginator.page = 0;
3431
}
35-
3632
}

0 commit comments

Comments
 (0)