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
Content upgraded via the UpgradeModule cannot be displayed in a modal.
What is the expected behavior?
Dialog displays with the upgraded component.
What is the current behavior?
Error: No provider for $scope!
at NoProviderError.BaseError [as constructor] (VM444 core.umd.js:1244)
at NoProviderError.AbstractProviderError [as constructor] (VM444 core.umd.js:1365)
at new NoProviderError (VM444 core.umd.js:1405)
at ReflectiveInjector_.throwOrNull (VM444 core.umd.js:2937)
at ReflectiveInjector.getByKeyDefault (VM444 core.umd.js:2976)
at ReflectiveInjector.getByKey (VM444 core.umd.js:2908)
at ReflectiveInjector.get (VM444 core.umd.js:2777)
at PlunkerAppModuleInjector.NgModuleInjector.get (VM444 core.umd.js:8491)
at View_DialogExample1.AppView.injectorGet (VM444 core.umd.js:11935)
at View_DialogExample1.DebugAppView.injectorGet (VM444 core.umd.js:12315)
So of course, after fighting with this for a day and a half, I figure it out a solution 30 minutes after posting an issue. It's using an undocumented config option (well, the option is listed on the docs page: https://material.angular.io/components/component/dialog, it just has no description) to pass the viewContainerRef of the component that's showing the dialog. If anyone from the material team would like to comment on whether that is the correct use of that option, or to update the documentation with more info, that would be great, but I think this issue can be closed.
Bug:
Content upgraded via the UpgradeModule cannot be displayed in a modal.
What is the expected behavior?
Dialog displays with the upgraded component.
What is the current behavior?
Error: No provider for $scope!
at NoProviderError.BaseError [as constructor] (VM444 core.umd.js:1244)
at NoProviderError.AbstractProviderError [as constructor] (VM444 core.umd.js:1365)
at new NoProviderError (VM444 core.umd.js:1405)
at ReflectiveInjector_.throwOrNull (VM444 core.umd.js:2937)
at ReflectiveInjector.getByKeyDefault (VM444 core.umd.js:2976)
at ReflectiveInjector.getByKey (VM444 core.umd.js:2908)
at ReflectiveInjector.get (VM444 core.umd.js:2777)
at PlunkerAppModuleInjector.NgModuleInjector.get (VM444 core.umd.js:8491)
at View_DialogExample1.AppView.injectorGet (VM444 core.umd.js:11935)
at View_DialogExample1.DebugAppView.injectorGet (VM444 core.umd.js:12315)
What are the steps to reproduce?
https://plnkr.co/edit/fbEavuu5Va78MgdTwLhy?p=preview
Clicking "Show Upgraded Component" works, but showing the same component in a dialog via the "Show Dialog" button does not.
What is the use-case or motivation for changing an existing behavior?
We have rewritten our app in Angular, but still rely on a few AngularJS components. They work everywhere else in our app except for inside of a modal.
Which versions of Angular, Material, OS, browsers are affected?
Tested with both Angular 2.4.7 and 4.0 beta 5. Material 2.0 beta 2. Chrome, IE, Firefox on Windows 8.
The text was updated successfully, but these errors were encountered: