Skip to content

How to use the snackbar action?  #1581

@stefanaerts

Description

@stefanaerts

Bug, feature request, or proposal:

What is the expected behavior?

What is the current behavior?

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

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

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

Is there anything else we should know?

I wonder where i can find an example of how to use the snackbar. I see the snackbar on the screen,but i have no idea how i can bind an action to the action button on the snackbar.
All i found is this:
failedAttempt() {
let config = new MdSnackBarConfig(this.viewContainerRef);
this.snackBar.open('It didn't quite work!', 'Try Again', config);

So how do i bind the Try again in this example to call another method?
Thanks

Metadata

Metadata

Assignees

No one assigned

    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