首页 > 解决方案 > Uncaught (in promise):导航堆栈至少需要一个根页面

问题描述

我想将按钮设置回我孩子的页面,我正在使用弹出功能但它不起作用。

我正在使用此代码

 import { IonicPage, NavController,} from 'ionic-angular';

 constructor(public navCtrl: NavController, ) {
    this.contactArray=JSON.stringify(this.navParams.get("contactArray")); 
    if(!this.contactArray || this.contactArray == ''){
       this.navCtrl.pop();
    }else{
      this.loadContactDetails();
    }    

  }

我得到这个

错误:未捕获(承诺中):导航堆栈在 c (polyfills.js:3) 处需要至少一个根页面

请帮忙

谢谢

标签: ionic-frameworkionic2ionic3progressive-web-apps

解决方案


推荐阅读