You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scriby opened this issue
Jul 3, 2019
· 1 comment
· Fixed by #16437
Assignees
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixP4A relatively minor issue that is not relevant to core functions
The portal made by MatDialog always defaults to the root component factory resolver, which means any dynamically rendered components must be registered in the root component. This seems to cause a lot of confusion (#1491, #8473) and lots of stack overflow posts.
Having to declare these components in the root module is bad for modularity and code splitting. It seems that if we could provide the component factory resolver to the portal (similar to how the viewContainerRef is provided for the injector), then it would be possible to define the dynamically created entryComponents in modules closer to where they're used.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixP4A relatively minor issue that is not relevant to core functions
Feature Description
The portal made by MatDialog always defaults to the root component factory resolver, which means any dynamically rendered components must be registered in the root component. This seems to cause a lot of confusion (#1491, #8473) and lots of stack overflow posts.
Having to declare these components in the root module is bad for modularity and code splitting. It seems that if we could provide the component factory resolver to the portal (similar to how the viewContainerRef is provided for the injector), then it would be possible to define the dynamically created entryComponents in modules closer to where they're used.
See
components/src/material/dialog/dialog.ts
Lines 268 to 269 in 94ad613
Use Case
Support lazy loaded dialog components, allowing for better code modularity and more precise code splitting.
The text was updated successfully, but these errors were encountered: