-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dialog): add
result
to MdDialogClose directive
MdDialog has MdDialogClose to make it easier to structure a dialog. But as MdDialogClose doesn't return any value, it's imposibble to use MdDialogClose if you want to get any return value when MdDialog is close. So `@Input('md-dialog-close')result` is added to MdDialogClose to solve it. no breaking changes
- Loading branch information
Showing
4 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/material-examples/dialog-result/dialog-result-example-dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<h1 md-dialog-title>Dialog</h1> | ||
<div md-dialog-content>What would you like to do?</div> | ||
<div md-dialog-actions> | ||
<button md-button (click)="dialogRef.close('Option 1')">Option 1</button> | ||
<button md-button (click)="dialogRef.close('Option 2')">Option 2</button> | ||
<button md-button md-dialog-close="Option 1">Option 1</button> | ||
<button md-button md-dialog-close="Option 2">Option 2</button> | ||
</div> |