Skip to content

Add info about entryComponents in Dialog documentation #2686

Closed

Description

@coder925

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

It should be easy to follow the dialog overview sample and get it up and running using a new app created with Angular CLI.

What is the current behavior?

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’s entryComponents. It would be helpful if there was a section in the documentation if this is a requirement.

What are the steps to reproduce?

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

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

It would improve the documentation if this is a requirement and help other people who might struggle with the same issue.

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

https://github.com/coder925/sample-angular-material-dialog-overview#versions

Is there anything else we should know?

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’s bootstrap instead. I was not able to get this to work.

Activity

  1. coder925 commented on Jan 18, 2017

    @coder925
    Author

    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!

  2. jelbourn commented on Jan 25, 2017

    @jelbourn
    Contributor

    Yep, looks like that information was accidentally lost in the transition from readme to overview.

  3. added
    docs
    P1
    on Jan 25, 2017
  4. rosslavery commented on Feb 16, 2017

    @rosslavery

    What also should be made clear is whether it should be added to:

    • entryComponents of the module the component belongs to
    • entryComponents of the module that contains the actual call to dialog.open() - as this could be a different module than the above-mentioned module
    • entryComponents of the root "App" module
    • All of the above (?)

    I'm actually still not clear myself on which it is to be honest.

  5. added a commit that references this issue on Feb 23, 2017
    61c3644
  6. added a commit that references this issue on Feb 28, 2017
    0881ee1
  7. added a commit that references this issue on Mar 1, 2017
    7a40ec7
  8. added a commit that references this issue on Apr 16, 2017
    ac476e4
  9. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Sep 5, 2019
  11. added
    in progress
    on Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1docsin progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions