Skip to content

Dialog Service Docs Need Updated: AOT & EntryComponent #8102

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

Closed
tommyc38 opened this issue Oct 28, 2017 · 5 comments · Fixed by #8133
Closed

Dialog Service Docs Need Updated: AOT & EntryComponent #8102

tommyc38 opened this issue Oct 28, 2017 · 5 comments · Fixed by #8133

Comments

@tommyc38
Copy link

Bug, feature request, or proposal:

The dialog component is not working. It doesn't appear to inject the component.

What is the expected behavior?

I would expect the dialog component to work as per the documentation.

What is the current behavior?

See StackBlitz example.

What are the steps to reproduce?

Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.

Plunker starter (using on @master): https://goo.gl/DlHd6U

StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV

https://stackblitz.com/edit/angular-material2-issue-hdwz9o

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

@tommyc38
Copy link
Author

I added the entryComponents in AppModule and everything started working fine. Your docs need updated because I am not using AOT and the entryComponent solved the issue.

@tommyc38 tommyc38 changed the title Dialog Service Doesn't Work Dialog Service Docs Need Updated: AOT & EntryComponent Oct 28, 2017
@julianobrasil
Copy link
Contributor

It's being tracked in docs repo: angular/material.angular.io#228

@jelbourn
Copy link
Member

@tommyc38 is this issue about the plunker example or the actual MatDialog?

@tommyc38
Copy link
Author

@jelbourn The docs state that you only need to add in entryComponents for AOT. I am using JIT and the only way it works is by adding in entryComponents. I think the docs need to simply say to add in entryComponents to your NgModule. I spent a few hours wondering why MatDialog did not work. I would like to help someone else avoid the same issue given its not very clear how to get it working IMHO. Thanks.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants