Skip to content

Opening an MdDialog with a TemplateRef that uses md-dialog-close throws "no provider for MdDialogRef"  #5412

Closed
@alex321

Description

@alex321

Proposal:

Provide MdDialogRef even when we pass a TemplateRef.

What is the current behaviour?

With the current setup if we pass a TemplateRef to MdDialog, there is no way to use md-dialog-close directive as it throws no provider for MdDialogRef as it requires it.

What is the expected behaviour?

It would be great if it works with a TemplateRef but if that's not possible, then could you please add a brief warning to the docs?

What are the steps to reproduce?

I can provide a plunkr if needed.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions