Ionic - Error: Uncaught (in promise): removeView was not found

前端 未结 11 812
天命终不由人
天命终不由人 2020-12-15 16:56

My Ionic app was working fine and I haven\'t done anything to it but suddenly I am getting this error and I don\'t know why.

\"Error: Uncaught (in pro

11条回答
  •  遥遥无期
    2020-12-15 17:44

    Please try the below which worked for me

    import { App } from 'ionic-angular';
    export class PopoverPage {
       constructor(public navCtrl: NavController
         , public viewCtrl: ViewController
        , public appCtrl: App) {
             this.viewCtrl.dismiss().then(()=>{
              setTimeout(()=>{
                confirm.dismiss().then(()=>{
                  this.appCtrl.getRootNav().setRoot('DashboardPage');
                })
              },300)
            })
        }
     }
    

提交回复
热议问题