-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Dialog] Example is broken due to autogenerated module #8750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm facing the exact same issue. In order to get the dialog to work it has to be put in the bootstrap section, in the app module declaration. I'm guessing that, since the dialog selector is not explicitly written anywhere, then the error. |
Found a fix for this in this issue. I tried the solution and it worked for me. |
Fixed here - angular/material.angular.io#356 |
Looks like this has been fixed. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
In the stackblitz for
mat-dialog
, thedialog-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.
The text was updated successfully, but these errors were encountered: