File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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' ;
22import { IgxPaginatorComponent } from 'igniteui-angular' ;
33import { 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}
You can’t perform that action at this time.
0 commit comments