[Paginator] Add app-wide configuration for MatPaginatorIntl #7344
Labels
feature
This issue represents a new feature or feature request rather than a bug or bug fix
help wanted
The team would appreciate a PR from the community to address this issue
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug, feature request, or proposal:
Kind of a bug.
What is the expected behavior?
MdPaginatorIntl provided in forRoot function. That way in can both app-wide and locally configured.
What is the current behavior?
Currently, MdPaginatorModule provides copy of MdPaginatorIntl for each import of module.
https://github.com/angular/material2/blob/0e4806b06c31c4968cd23a16f73bdcee8fe44cde/src/lib/paginator/paginator-module.ts
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U
What is the use-case or motivation for changing an existing behavior?
I have a localization service, that sets paginator intl variables
but I can't do it once for whole application.
If I just provide own copy of MdPaginatorIntl in AppModule, it will not be used. Because feature modules of app are import MdPaginatorModule with MdPaginatorIntl provider.
I have tried to make my own paginator module, but then
Type MdPaginator in ... is part of the declarations of 2 modules:
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular 4.4.3
material 2.0.0-beta.11
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: