Hi,
I’ve ion-list with items into ion-content. I add ion-pull-to-refresh but when I pull the list is not refreshed.
<ion-content class="has-header back-content" padding="false">
<ion-refresher
pulling-text="Pull to refresh..."
refreshing-text="Updating..."
refreshing-icon="ion-refreshing"
on-refresh="doRefresh()">
</ion-refresher>
<ion-list
show-delete="shouldShowDelete"
can-swipe="listCanSwipe">
<ion-item ng-repeat="item in items" class="item item-background">............
This is the refreshing funtion from the controller:
$scope.doRefresh = function () {
console.log("Sono nel refresh");
Service.GetItem($scope.uniqueID).success(function (response) {
console.log("Sono nel refresh - GetPublicFolderItems");
$scope.items = response.Payload;
$scope.listCanSwipe = true;
}).
error(function (response, status, headers, config) {
console.log("Errore response doRefresh " + response);
})
.finally(function() {
// Stop the ion-refresher from spinning
console("Finally refreshing function");
$scope.$broadcast('scroll.refreshComplete');
});
};
Thanks