Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49188

IOS infinite-scroll doesn't load data

$
0
0

@ebrarislami wrote:

Hi, i have a problem with infinite scroll in my app. my code works on android but not on iphone. On iphone when i scroll down it doesnt load data and keeps loading..
ion-infinite-scroll distance="1%" on-infinite="loadMoreGroups()" ng-if="!moregroups"></ion-infinite-scroll

   $scope.byCategory = function(id){
      $scope.catpage = 1;
      $scope.catID = id;
      //$scope.moredata = true;
      $http.get($rootScope.url+'category/'+id+'/questions/v1?page=0').then(function(response){
        $scope.LimitC = response.data.totalElements;
        if($scope.limitC > 10){
          $scope.moredata = false;
        }
        $scope.categoryQuestions = response.data.content;
        $scope.categoryQuestionModal.show();
        console.log($scope.LimitC);
        console.log($scope.moredata);
      });

      $scope.loadMoreCategoryQuestions = function(){
        console.log("YES");
        $http.get($rootScope.url+'category/'+$scope.catID+'/questions/v1?page='+$scope.catpage).then(function(response) {
        console.log("LImit IS:"+$scope.LimitC);
        console.log($scope.catpage);

        console.log(response.data.content.length);
        $scope.categoryQuestions = $scope.categoryQuestions.concat(response.data.content);
        if($scope.categoryQuestions.length >= $scope.LimitC){
          $scope.moredata = true;
        }

         $scope.$broadcast('scroll.infiniteScrollComplete');
         $scope.catpage = $scope.catpage+1;
       });
      }
    }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>