Ion-view event callback when cached view in background enters foreground

It would be great if an $ionicView event could be fired when a cached view of an Ionic app is brought from background (minimized) to foreground.

This is not a problem if the view hasn’t been loaded before - the controller would need to load anyway, and that provides a signal for data to be refreshed.

However, if the view the user was last at when they minimized the app is still in the cache, no events get fired, and the user is left looking at old data.

@mhartington, might you be able to confirm whether or not this is intended behavior, or if there are specific reasons for this behavior? Many thanks :slight_smile:

So you want an even when the app comes back from being paused and put in the background?

Should be able to tap into the cordova events for that.

http://cordova.apache.org/docs/en/4.0.0/cordova_events_events.md.html#resume

  $ionicPlatform.on('resume', function() {
    alert("Resume");
  })
1 Like

Right, totally missed that :/. Thank you!

1 Like