Cannot set custom global ErrorStateMatcher for lazy loaded modules
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
There should be ability to override ErrorStateMatcher for the whole application
#### What is the current behavior?
`@NgModule({
providers: [
{provide: ErrorStateMatcher, useClass: CustomErrorStateMatcher}
]
})`
CustomErrorStateMatcher being provided in the application root module aren't applied inside of lazy loaded modules. Thus it is necessary to duplicate providing of custom error state matcher in every lazy loaded module.
#### What is the use-case or motivation for changing an existing behavior?
It is reasonable to have ability to override error state matcher bahavior for the whole app no matter it consists of lazy or non-lazy modules
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.1.3
Material 5.2.2
Beitragsleitfaden
Rechercherichtung
Beginne damit, die gezeigte Konfiguration des ErrorStateMatcher-Providers mit Angular 5.1.3 und Material 5.2.2 zu reproduzieren, und vergleiche dabei Root- und Lazy-Loaded-Module. Verfolge, wie der benutzerdefinierte Matcher in jedem Modul aufgelöst wird. Die Aufgabe ist erledigt, wenn der anwendungsweite Matcher innerhalb von Lazy-Loaded-Modulen angewendet wird, ohne den Provider zu duplizieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100