[Dialog] Example is broken due to autogenerated module
See original GitHub issueBug, feature request, or proposal:
In the stackblitz for mat-dialog
, the dialog-content-example-dialog
component does not use the selector <dialog-content-example-dialog>
and causes “Error: The selector “dialog-content-example-dialog” did not match any elements at…”. Following the example in my own project causes the same error.
When I add the selector to the html, it causes "Unhandled Promise rejection: StaticInjectorError[MatDialogRef]: StaticInjectorError[MatDialogRef]: NullInjectorError: No provider for MatDialogRef!
What is the expected behavior?
No errors when using mat-dialog
as described in the stackblitz.
What is the current behavior?
Errors when following the example.
What are the steps to reproduce?
Just open the stackblitz and look at the console. https://stackblitz.com/angular/dgjvllndexp?file=app%2Fdialog-content-example.html
What is the use-case or motivation for changing an existing behavior?
Avoiding errors
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I’m using Angular 5.0.1, Material 5.0.0-rc0, Typescript 2.4.2, latest version of Chrome (Version 62.0.3202.94)
Is there anything else we should know?
I’m still learning Angular 2+ and Material2 so I may just be missing something obvious.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Found a fix for this in this issue. I tried the solution and it worked for me.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.