bug(MatDialog): Tokens from lazy module are not available in another module's popup component #22021
Labels
area: material/dialog
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Uh oh!
There was an error while loading. Please reload this page.
Reproduction
https://stackblitz.com/edit/angular-material-dialog-token-from-lazy-module?file=src%2Fapp%2F%2Bteacher%2Fcomponents%2Fteacher-page%2Fteacher-page.ts
Steps to reproduce:
ContentComponents
token access insideHomeworkPopupComponent
Expected Behavior
MatDialog
uses passed ViewContainerRef`s injector as a parent for popup component, so it's expected to have all tokens from such injector available inside popupcomponents/src/material/dialog/dialog.ts
Line 298 in c34511e
Actual Behavior
ContentComponents
token is available from TeacherPageComponent'sviewContainerRef.injector
.Also it's available from
@SkipSelf() private injector: Injector
inside HomeworkPopupComponent. But we can't use this hack because we need this token deep in HomeworkPopupComponent's children.Environment
The text was updated successfully, but these errors were encountered: