Hi there,
I’ve go a question corresponding app “resume” event. I want to refresh a list in my controller (list of items listed in frontend) on app resume. What i have in my controller is:
$scope.loadList = function() {
var promise = ListItems.all();
promise.then(
function (payload) {
$scope.listItems = payload;
$scope.selectedItem = $scope.listItems[0];
},
function (errorPayload) {
$log.error('failure loading items', errorPayload);
});
}
$ionicPlatform.on('resume', function(){
$scope.loadItems();
});
But somehow it does not work.
Any idea what I’m doing wrong or how I could archive this?
Cheers