我使用$mdDialog.show()打开了一个模板,如下所示:-
$mdDialog.show({
skipHide: true,
controller: 'EditController',
templateUrl: 'app/View/Edit.html',
parent: angular.element(document.body),
clickOutsideToClose: false
});现在,我尝试在保存数据之前显示警报,方法是使用如下$mdDialog.confirm():-
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();
});问题:打开警报后关闭打开的模板。
发布于 2017-07-31 14:28:51
可以同时打开多个对话:
对
multiple服务使用$mdDialog选项允许开发人员同时显示多个对话框。
示例:
// From plain options
$mdDialog.show({
multiple: true
});
// From a dialog preset
$mdDialog.show(
$mdDialog
.confirm()
.multiple(true)
);这是这方面的Reference。
https://stackoverflow.com/questions/40583085
复制相似问题