File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
- import { ChangeDetectorRef , Component , OnInit , ViewChild } from '@angular/core' ;
1
+ import { AfterViewInit , ChangeDetectorRef , Component , ViewChild } from '@angular/core' ;
2
2
import { IgxPaginatorComponent } from 'igniteui-angular' ;
3
3
import { DATA } from '../../data/product' ;
4
4
@@ -7,17 +7,14 @@ import { DATA } from '../../data/product';
7
7
styleUrls : [ './pagination-sample.component.scss' ] ,
8
8
templateUrl : './pagination-sample.component.html'
9
9
} )
10
- export class PaginationSampleComponent {
11
-
10
+ export class PaginationSampleComponent implements AfterViewInit {
12
11
@ViewChild ( 'paginator' , { static : true } ) public paginator ! : IgxPaginatorComponent ;
13
12
public productData = DATA ;
14
13
public itemsPerPage = [ 3 , 4 , 5 ] ;
15
14
16
- constructor ( public cdr : ChangeDetectorRef ) {
17
- }
15
+ constructor ( public cdr : ChangeDetectorRef ) { }
18
16
19
- // eslint-disable-next-line @angular-eslint/use-lifecycle-interface
20
- ngAfterViewInit ( ) {
17
+ public ngAfterViewInit ( ) {
21
18
this . cdr . detectChanges ( ) ;
22
19
}
23
20
@@ -32,5 +29,4 @@ export class PaginationSampleComponent {
32
29
public navigateToFirstPage ( ) {
33
30
this . paginator . page = 0 ;
34
31
}
35
-
36
32
}
You can’t perform that action at this time.
0 commit comments