question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Dialog] Example is broken due to autogenerated module

See original GitHub issue

Bug, 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rodschulzcommented, Dec 3, 2017

Found a fix for this in this issue. I tried the solution and it worked for me.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Propagating service instance to dialog component not working ...
I have a component (here it's the app.component) which a service is declared on (MyService). I need a new instance of MyService each...
Read more >
opensips/dialog at acd20ae2d93c5cc16f4eaf0bd405c193c08dc37d ...
List of Examples ... The dialog module provides dialog awareness to the OpenSIPS ... ending a disconnected dialog due to pings getting retried...
Read more >
Component autogeneration - Magnolia CMS Docs
When set to mgnl:component , defines the referenced item as a component and generates a component node. templateId. required. Component ID in <module>:<path> ......
Read more >
Automatic Dialog Mask Generation for Device ... - CiteSeer - Yumpu
Gen Module with two concrete dialog masks. (see Sect. 3.3) and encapsulates them in a DiaGen module. (12). The DiaGen module is built...
Read more >
Custom Component | Adobe Experience Manager
This tutorial covers the end-to-end creation of a custom AEM Byline Component that displays content authored in a Dialog, and explores ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found