IONIC页面重复返回的问题

        IONIC在返回上一个页面的时候,有可能会在两个页面之间进行重复返回,以下是解决方法

 //跳转页面传的参数 Gbd ,Dslst
this.navCtrl.push('PrintPage', { 'Gbd': this.Gbd, 'Dslst': this.Dslst }).then(() => {
      //获取当前页面的Index
      const index = this.viewCtrl.index;
      //移除当前页面之前所有的页面,直接返回到指定的 PrnPage 页面
      for (let i = index; i > 0; i--) {
        this.navCtrl.remove(i);
      }
    });

猜你喜欢

转载自blog.csdn.net/qq_41868796/article/details/82356837