Proposal
It should be easy to follow the dialog overview sample and get it up and running using a new app created with Angular CLI.
I was struggling with getting the Dialog component to work without showing errors in the console. I finally solved it by adding my DialogContentComponent to the module鈥檚 _entryComponents_. It would be helpful if there was a section in the documentation if this is a requirement.
The steps to reproduce the errors in the console is available from:
https://github.com/coder925/sample-angular-material-dialog-overview#sample-angular-material-dialog-overview
It would improve the documentation if this is a requirement and help other people who might struggle with the same issue.
https://github.com/coder925/sample-angular-material-dialog-overview#versions
I can submit a PR for improved documentation. However, I am afraid my knowledge regarding why you must place the _content dialog component_ in _entryComponents_ is not sufficient to be able to describe the reasons for this requirement correctly.
The Plunkr sample of the Dialog Overview places the content dialog component in the module鈥檚 bootstrap instead. I was not able to get this to work.
I see that the requirement of _entryComponents_ is mentioned in the README of the Dialog. So my proposal is merely to also include this information on https://material.angular.io/components/component/dialog . Thanks!
Yep, looks like that information was accidentally lost in the transition from readme to overview.
What also should be made clear is whether it should be added to:
entryComponents of the module the component belongs toentryComponents of the module that contains the actual call to dialog.open() - as this could be a different module than the above-mentioned moduleentryComponents of the root "App" moduleI'm actually still not clear myself on which it is to be honest.
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._
Most helpful comment
What also should be made clear is whether it should be added to:
entryComponentsof the module the component belongs toentryComponentsof the module that contains the actual call todialog.open()- as this could be a different module than the above-mentioned moduleentryComponentsof the root "App" moduleI'm actually still not clear myself on which it is to be honest.