Skip to content

Instantly share code, notes, and snippets.

@hbweb
Created October 18, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbweb/59f84dd4c13111d6e2a41df1a4a54a68 to your computer and use it in GitHub Desktop.
Save hbweb/59f84dd4c13111d6e2a41df1a4a54a68 to your computer and use it in GitHub Desktop.
MdpaginatorIntl service
import { MdPaginator, MdPaginatorIntl } from '@angular/material';
export class MyCustomPaginator extends MdPaginatorIntl{
constructor(){
super();
this.nextPageLabel = ' My new label for next page';
this.previousPageLabel = ' My new label for previous page';
this.itemsPerPageLabel = 'Task per screen';
}
}
@NgModule({
imports: [ MdPaginator],
exports: [],
declarations: [],
providers: [{
provide: MdPaginatorIntl, useClass: MyCustomPaginator
}]
})
export class HomeModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment