Skip to content

Dialog close / Dialog cancel #4583

@mbeckenbach

Description

@mbeckenbach

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

There should be two methods for closing a dialog. One for a close and one for a cancel.

What is the current behavior?

There is only one close method and so only one afterClosed.

What are the steps to reproduce?

Create any dialog

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

Imagine an edit dialog with a save and a cancel button. At the moment you would have to pass something intro the close method and check for it after close to detect a save action. Would be much easier if there where two different events to subscribe. afterClose and afterCancel.

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

ng 4.1.x, md beta 5

Is there anything else we should know?

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