Refresher Data Load Issue


#1

Refersher does not update the new data in UI. :frowning:

$scope.onReferesh = function () {            
            service.GetLiveFeed({ numberItemsToSkip: 0, numberOfItemsToTake: 4, IsMemberSession: 'true' }, function (response) {
                $scope.items = response;
                $scope.$broadcast('scroll.refreshComplete');
            });            
        }

<content has-header="true" ng-controller="LiveExhibitCtrl" on-refresh="onReferesh()" style="background:#eee;">                   
                <refresher></refresher>
....
</content>

#2

In your service, are you using a promise? If so, you need to do this:

    $scope.onReferesh = function () {
        service.GetLiveFeed({ numberItemsToSkip: 0, numberOfItemsToTake: 4, IsMemberSession: 'true' }).then(
            function (response) {
               $scope.items = response;
                $scope.$broadcast('scroll.refreshComplete');
            },
            
            function(failure) {
                // Manage Failure
            }
        )
    };

#3

@Calendee I tried with promise but it is not working. I am able to get data but it is not updating the view. :frowning:


#4

If you put a sample online via Plunkder or Codepen, we might be able to troubleshoot it.