gpt4 book ai didi

javascript - 如何在 md-dialog 上叠加 md-dialog

转载 作者:行者123 更新时间:2023-11-30 11:53:43 28 4
gpt4 key购买 nike

我试图从一个打开的 md-dialog 中打开一个 md-dialog,但问题是第一个 md-dialog 在第二个打开时关闭了

// the controller of the first popUp 
class popUpOneController{
constructor($mdDialog){
this.$mdDialog=$mdDialog;
.
.
.
}
others methods codes......
// the second $mdDialog to be opened from the first
// this function will be executed by clicking on a html button
openPopUp2(){
// here we call a component into the $mdDialog
this.$mdDialog.show({
template: '<interlo-sibel data-to-pass='+data+' index-selectedElm='+index+' type='+type+' ></interlo-sibel>',
targetEvent: event,
escapeToClose: false

})
}
popUpOneController.$inject=['$mdDialog'];


export default popUpOneController

最佳答案

我找到了答案,我们刚刚添加了以下属性 'skipHide: true'

 openPopUp2(){
// here we call a component into the $mdDialog
this.$mdDialog.show({
template: '<interlo-sibel data-to-pass='+data+' index-selectedElm='+index+' type='+type+' ></interlo-sibel>',
targetEvent: event,
skipHide: true


})
}

plunker 上的演示链接:https://plnkr.co/edit/jaDD79A1JII4XKhXP64Y?p=preview

关于javascript - 如何在 md-dialog 上叠加 md-dialog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38725026/

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