2016-08-02 14 views
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 

回答

3

第一MD-對話框關閉我找到了答案,我們剛纔添加以下attiribute 'skipHide:真正的'

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

相關問題