Ionic Refresh Current Page

Don’t do reload(), it messes things up down the road like sqlite plugin and possibly other internal states outside the webview

If there is a problem with change detection by angular (which may also indicate a design issue), wrap your stuff in a zone so angular knows what to monitor.

Dont go calling internal onWillEnter etc.

somehow doesn’t seem to work, this was my first attempt too…

Someone buy Beer For @dupinder … works like champ

Pull-to-Refresh

Guys, checkout this helpful video I found which shows how to do pull-to-refresh a page in ionic application: https://youtu.be/LBZQ-jHuQq0

Auto-Refresh on Event Triggering

Add the following code by @dupinder:

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

2 Likes

HugoPetla, maybe look at zones…
I had same issue with bluetooth app specifically.

Worked like a charm for me :smiley:

Do you need a beer? :*

this.navCtrl.setRoot(this.navCtrl.getActive().component); is work fine in android but not working on IOS for me. when we use for IOS app is going to Crashed .
Please Help

Its dirty hack but it does what I need (to reset a file input which honestly also wasn’t 100% member of the Angular loop). Thank you.

import {Content} from 'ionic-angular';
@Component({
.... 
})

export  default class HomePage extends Component{

 @ViewChild(Content) content:Content;


//binded for any event (click,onChange ...)
updateContent(){
   
//recalculate everything on current page; 
  this.content.resize();
}

}

ionViewDidEnter() work for me! Ty

None of the proposed solutions on this thread worked for me, however this stackoverflow answer worked perfectly.

call the method ionViewWillLoad() for refresh the any page and with this your navigation is same as before…

it Works for me too. Thank you!

This refreshes but lost naviagtion

Follow this below and my comment there. It works well.

but the problem is it doesn’t detect the changes all the time. For example, I am publishing en event in some page in my app and I already subscribed to this event in my home page. When the event happens home page needs to change little bit but when I go to home page after the event happened I saw that It is the same??

Thanks! Helped me a lot

In my case it’s reloading my application whereas i just want to reload my current page.

Please read this, and see if you feel any differently about that.