0

after reading How to use MatPaginatorIntl? I have successfully managed to adapt a MatPaginatorIntl to my needs.

However, I would like to know how to use different MatPaginatorIntl for different sorts of table in my Angular App?

I have added to my AppModule.ts providers: [{ provide: MatPaginatorIntl, useClass: MatPaginatorIntlCro}],

But just adding another MatPaginatorIntl as a Provider won't change my issue because I can only provide one.

So I probably have to find a way to use different providers of MatPaginatorIntl for differen tables. Does anyone have an idea how to approach this?

Thank you very much in advance!

R. Richards
  • 24,603
  • 10
  • 64
  • 64
LikeAKemper
  • 155
  • 2
  • 12
  • I donno if I had understood your question properly. As you have added in the providers of `app.module.ts`, it is applied across all the components. Try to put these providers in the nearest/enclosing module of the component in which you are using the paginator – dileepkumar jami Feb 16 '19 at 15:50

1 Answers1

1

I donno if I had understood your question properly. As you have added in the providers of app.module.ts, it is applied across all the components.

Try to put these providers in the nearest/enclosing module of the component in which you are using the paginator.

dileepkumar jami
  • 2,185
  • 12
  • 15