Reputation: 9858
I have open a template by using $mdDialog.show() like this:-
$mdDialog.show({
skipHide: true,
controller: 'EditController',
templateUrl: 'app/View/Edit.html',
parent: angular.element(document.body),
clickOutsideToClose: false
});
Now I am tring to show the alert before saving the data by using the $mdDialog.confirm() like this:-
var confirm = $mdDialog.confirm() .parent(angular.element(document.body))
.content('Are you sure to save the document? ')
.ok('Save')
.cancel('Cancel')
$mdDialog.show(confirm).then(function () {}
,function () { $mdDialog.hide();
});
Issue : Closing the opened template after opening the alert.
Upvotes: 3
Views: 2743
Reputation: 2664
Multiple dialogues can be opened at the same time:
Using the
multiple
option for the $mdDialog service allows developers to show multiple dialogs at the same time.
Example:
// From plain options
$mdDialog.show({
multiple: true
});
// From a dialog preset
$mdDialog.show(
$mdDialog
.confirm()
.multiple(true)
);
Here is the Reference for this.
Upvotes: 4