Skip to content

MdSnackbar with injectable data #5371

Closed
@jurafa

Description

@jurafa

Bug, feature request, or proposal:

feature request

What is the expected behavior?

MdSnackBar.openFromComponent should allow specifying data being injected into the component in a similar fashion as it works in MdDialog.

What is the current behavior?

MdSnackBar.openFromComponent only lets you choose the component to be rendered but the caller has no option how to parameterize the component.

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

One use-case might be to use the MdSnackBar for showing logs. A user might want to have a template for error logs and a different template for info logs. He can use MdSnackbar.openFromComponent to choose the template but he cannot inject the actual message into the template component.

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

reported in @angular/material 2.0.0-beta.7

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions