首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在md-dialog上叠加md-dialog

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

Stack Overflow用户
提问于 2016-08-02 23:44:02
回答 1查看 169关注 0票数 1

我试图打开一个打开的多维对话框,但问题是第一个多维对话框在第二个打开时关闭了

代码语言:javascript
运行
复制
// 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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-03 00:18:43

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

代码语言:javascript
运行
复制
 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

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38725026

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档