Search code examples
angularionic-frameworkionic2ionic3angular5

How to refresh a page on Ionic 3 (Ionic, Angular 5)


I’m building a favorite list which I can erase list items within a page. It’s based on Ionic sqlite storage.

I found Ionic page will keep removed ion list items until I re-enter the list page. So it needs refreshing a page upon removing an item from ionic storage.

How can I refresh a particular page? window.location.refresh() seems to refresh the entire pages… this is not what I’m trying to do.

I need to refresh a single page out of twenty pages on my app so navCtrl.setRoot() will not work either.

Thanks in advance,


Solution

  • Please Try this?

    this.navCtrl.setRoot(this.navCtrl.getActive().component);