We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f97945 commit 46d0b6fCopy full SHA for 46d0b6f
src/lib/dialog/dialog.md
@@ -29,6 +29,17 @@ Components created via `MdDialog` can _inject_ `MdDialogRef` and use it to close
29
in which they are contained. When closing, an optional result value can be provided. This result
30
value is forwarded as the result of the `afterClosed` promise.
31
32
+```ts
33
+@Component({/* ... */})
34
+export class YourDialog {
35
+ constructor(public dialogRef: MdDialogRef<YourDialog>) { }
36
+
37
+ closeDialog() {
38
+ this.dialogRef.close('Pizza!');
39
+ }
40
+}
41
+```
42
43
### Sharing data with the Dialog component.
44
If you want to share data with your dialog, you can use the `data` option to pass information to the dialog component.
45
0 commit comments