gpt4 book ai didi

angularjs - Angular Material 从模板指令关闭 mdDialog

转载 作者:行者123 更新时间:2023-12-04 20:34:03 25 4
gpt4 key购买 nike

我试图通过这种方式关闭对话框:

showAlert(ev) {
this.mdDialog.show({
restrict: 'E',
template:'<loader></loader>' +
' <md-button ng-click="this.mdDialog.hide()" class="md-primary">' +
' Close Dialog' +
' </md-button>' ,
parent: angular.element(document.body.childNodes[5]),
clickOutsideToClose:true
});
};
closeDialog() {
this.mdDialog.hide();
};
但是按钮出现并且什么都不做。
任何的想法 ?

最佳答案

我在那里找到了答案
http://webiks.com/mddialog-with-a-confirmation-dialog/ ,

在页面的最后一个 plunker https://embed.plnkr.co/HiLJlsp0yfcukxi2McNZ/ .

不需要范围属性。

附注

现在我在版本之后看到@camden_kid 的回答,对我来说也是正确的,谢谢。

关于angularjs - Angular Material 从模板指令关闭 mdDialog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39350752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com