setRoot to the same page with refresh


#1

Hello everybody.
I have a little problem.
In my root page I am pushing new page:

    this.navCtrl.push(DetailsPage);

After that in my DetailsPage I am doing some actions which change the content of my root page and then in alert I’m closing my DetailsPage.

let alert = this.alertCtrl.create({
 ...
      buttons: [{
          handler: () => {
            this.navCtrl.setRoot(RedditsPage);
            return false;            
          } }  
      ],
      enableBackdropDismiss: false
    });

But it shows me RedditsPage with old data, it suppose to show new data. How can I fix it?


#2

put your data function in ionViewWillEnter


#3

I cant, then I have everywhere undefined.
Problem is with setting root to the same page in alert.