I'm getting data from a web service and should get for each time you try to update, so the last id to load from the back to. That works fine for me, the problem is in the ion-scroll. I saw that if you are not accompanied by a ng-if infinite information load times quite uncomfortable. If there are data determined charge, if the charge, otherwise not charge anything and that is where I set value for my variable ng-if. But once the true seteo does not load my scroll anymore.
HTML
<ion-infinite-scroll on-infinite="loadMore()" ng-if="!noMoreItemsAvailable" distance="1%"></ion-infinite-scroll> JS
$scope.refreshView = function () { if (!navigator.onLine) { $scope.hide(); $ionicPopup.show({ title: 'Notificación', subTitle: '', content: 'No tienes conexión a internet.', buttons: [{ text: 'Aceptar', type: 'button-positive', }, ] }) } else { console.log($scope.ultima_id); if (typeof $scope.ultima_id == "undefined" || $scope.ultima_id == "") { } else { console.log(UrlService.url + 'refreshView/' + sessionService.get("user_id") + '/' + sessionService.get("hash") + "/" + $scope.ultima_id); $http({ method: 'GET', url: UrlService.url + 'refreshView/' + sessionService.get("user_id") + '/' + sessionService.get("hash") + "/" + $scope.ultima_id }) .success(function (data) { console.log("Refresh " + data); if (data.Count > 0) { $scope.viewsDespeglables = true; angular.forEach(data.View, function (value, key) { if (data.Count - 1 == key) { $scope.ultima_id = value.id; } $scope.views.push(value); }); } else { console.log(data); $scope.noMoreItemsAvailable = true; } }) .error(function () {}) .finally(function () { $scope.$broadcast('scroll.infiniteScrollComplete'); }); } } } $scope.loadMore = function () { $scope.refreshView(); $scope.$broadcast('scroll.infiniteScrollComplete'); $scope.$broadcast('scroll.resize'); };