2016-03-02 45 views
1

後,我有一個模式頁:離子2:「黑屏」模式接近

import {Page, ViewController, NavParams} from 'ionic-framework/ionic'; 
@Page({ 
    templateUrl: 'build/pages/tosmodal/tosmodal.html' 
}) 
export class TOSModal { 

    static get parameters() { 
     return [[NavParams], [ViewController]]; 
    } 

    constructor(navParams, viewCtrl) { 
     this.data = navParams.data; 
     this.viewCtrl = viewCtrl; 
    } 

    close() { 
     this.viewCtrl.dismiss(); 
    } 
} 

當關閉()被調用時,模態撤職,但以前的頁面不顯示。對<ion-page>元素,顯示:無添加:

ion-page { 
    display: none; 
} 

我錯過了什麼嗎?也許在onDismiss方法?

回答

3

爲什麼,但打開模態時,如果它是一個的setTimeout(內presentend),則預計接近作品真的不明白:

setTimeout(() => { 
    this.nav.present(modal); 
})