Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 939f6c9

Browse files
committed
docs(dialog): clarify promise rejection behavior in descriptions
- improves prompt and confirm dialog descriptions Fixes #10130
1 parent 1e1298a commit 939f6c9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/dialog/dialog.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,9 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) {
435435
* @name $mdDialog#confirm
436436
*
437437
* @description
438-
* Builds a preconfigured dialog with the specified message. You can call show and the promise returned
439-
* will be resolved only if the user clicks the confirm action on the dialog.
438+
* Builds a preconfigured dialog with the specified message. You can call show and the promise
439+
* returned will be resolved if the user clicks the confirm action on the dialog. The promise will
440+
* be rejected if the user clicks the cancel action or dismisses the dialog.
440441
*
441442
* @returns {obj} an `$mdDialogPreset` with the chainable configuration methods:
442443
*
@@ -460,8 +461,10 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) {
460461
* @name $mdDialog#prompt
461462
*
462463
* @description
463-
* Builds a preconfigured dialog with the specified message and input box. You can call show and the promise returned
464-
* will be resolved only if the user clicks the prompt action on the dialog, passing the input value as the first argument.
464+
* Builds a preconfigured dialog with the specified message and input box. You can call show and the
465+
* promise returned will be resolved, if the user clicks the prompt action on the dialog, passing
466+
* the input value as the first argument. The promise will be rejected if the user clicks the cancel
467+
* action or dismisses the dialog.
465468
*
466469
* @returns {obj} an `$mdDialogPreset` with the chainable configuration methods:
467470
*

0 commit comments

Comments
 (0)