sc...@eade.id.au
unread,Oct 9, 2012, 9:24:29 PM10/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
I am building an iOS app using Angular in conjunction with Phonegap/Cordova. One of the things I need to do is to deal with the situation where someone switches to a different app then returns to my app. To do this my app listens for the resume event thus:
document.addEventListener('resume', $scope.resume, false);
$scope.resume appears to be invoked correctly when the user returns to my app, but any updates it makes that ought to be reflected on the page are not.
$scope.resume = function() {
var now = new Date();
console.log('resumed at ' + now); // log statement is output as expected
$scope.counter = 0; // value of $scope.counter is updated, but the pages reference to it is not
};
So after executing upon resume, $scope.counter is 0, but this is not reflected on the page.
Is there something I would need to do in my resume function to somehow trigger Angular to update the page content?
Thanks,
Scott