1

我试图从一个打开的 md 对话框中打开一个 md 对话框,但问题是第一个 md 对话框在第二个打开时关闭

// 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
4

1 回答 1

3

我找到了答案,我们刚刚添加了以下属性 '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

于 2016-08-02T16:18:42.970 回答