Ion-pull-to-refresh: Why list Did not refreshed?

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

if i look at the sample here http://learn.ionicframework.com/formulas/pull-to-refresh/ it seems like you are missing the $scope.$apply() statement?

Uhm…I tried but I think that is not the problem. It not enter into the finally. I see “updating…” and don’t disappear.

put your code in a codePen so other can reproduce your error, the code you have listsed above does not reflect the example

Ok…I’ll try to extract code…