How to reload the ion-page after pop() in ionic2

Akash Rao picture Akash Rao · Mar 31, 2016 · Viewed 35.7k times · Source

I have 2 pages Page1 and Page2. I have used this.nav.pop() in Page2 and it will pop the Page2 and Page1 will enable but i want to refresh the Page1. Thank you in advance.

Answer

noel zubin picture noel zubin · Nov 29, 2016

you could pass the parent page along with the nav push. that way you could accces the parent page as a navParamter.
in parent page:

 goToChildPage() {
    this.navCtrl.push(ChildPage, { "parentPage": this });
 }

and in the child page before pop you could call functions on parent page

this.navParams.get("parentPage").someFnToUpdateParent();
  //or
this.navParams.get("parentPage").someFnToRefreshParent();