I am using Angular 6.0.3 with Angular Material 7.1.0, I have my paginator in a separate component (that is not the app.component). What I have tried so far:
Created separate ts file called myPagniator.ts:
import {MatPaginatorIntl} from '@angular/material';
export class MyPaginatorLabel extends MatPaginatorIntl {
itemsPerPageLabel = 'custome_label_name'; // customize item per page label
constructor() {
super();
}
}
In my app.module.ts : I imported both MatPaginatorModule, MatPaginatorIntl from Angular Material. Inside providers array of app.module.ts, I put in MyPaginatorLabel and MatPaginatorIntl.
In the component which is using Angular MatPaginator, I extends MyPaginatorLabel class and have its constructor calls super() method, still it displays default text "itemsPerPage" after all this
What have I done wrong here ?? Can someone give me a bit of hint ?