I’m using the push notification plugin and I fire an event to refresh the page data when the notification is clicked.
In the page constructor I connected the event to the function that reloads the data
this.events.subscribe('main:get', () => {
this.refreshData();
});
and
refreshData(refresher=null) {
this.http.get(`http://....`)
.map(res => res.json())
.subscribe(
data => this.data = data,
err => this.error = err,
() => {
if(refresher) refresher.complete();
}
);
}
now when I refresh using ion-refresher everything works fine but when I call it from the event the page doesn’t update even if the data changes, also as soon as I click on the menu icon the content of the page is refreshed