From f98234c8737e0c2ab9d4130dad5a113f06ecaa3f Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 30 Oct 2016 18:53:26 +0100 Subject: [PATCH] docs(dialog): explain how to show multiple dialogs * Add a brief documentation on how to show multiple dialogs at the same time. * Adds the `multiple` option to the preset methods (as same as for the $$interimElement default preset) Closes #8630. --- src/components/dialog/dialog.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/dialog/dialog.js b/src/components/dialog/dialog.js index 715ce47be1b..2ffe5b0c429 100644 --- a/src/components/dialog/dialog.js +++ b/src/components/dialog/dialog.js @@ -200,6 +200,25 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) { * })(angular); * * + * ### Multiple Dialogs + * Using the `multiple` option for the `$mdDialog` service allows developers to show multiple dialogs + * at the same time. + * + * + * // From plain options + * $mdDialog.show({ + * multiple: true + * }); + * + * // From a dialog preset + * $mdDialog.show( + * $mdDialog + * .alert() + * .multiple(true) + * ); + * + * + * * ### Pre-Rendered Dialogs * By using the `contentElement` option, it is possible to use an already existing element in the DOM. * @@ -565,7 +584,7 @@ function MdDialogProvider($$interimElementProvider) { return $$interimElementProvider('$mdDialog') .setDefaults({ methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose', - 'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen'], + 'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen', 'multiple'], options: dialogDefaultOptions }) .addPreset('alert', {