infinite scroll in Ionic not working

207 Views Asked by At

I am trying to implement infinite scroll however, it is not working. it keeps loading the same number of pages and doesn't load new pages. Id appreciate any help.

this is my controller :

$scope.getsomeinfo = function () {
            $scope.isLoading = true;
            $ionicLoading.show({
                template: 'Loading ..'
            });

            info.getsomeinfo()
                .then($scope.someinfo
                , $scope.fjbfuirbf);
        };


        $scope. = function () {
            var options = {};
             = );





        };
2

There are 2 best solutions below

0
hayatoShingu On

if I understand your code

this line

options.page = Math.ceil($scope.allDeals.count + 10 / 10);

should be

options.page = Math.ceil(($scope.allDeals.count + 10)/ 10);
0
hayatoShingu On

if the attributes in defaultParams are correct (in the second call), so something like:

var defaultParams = {
           mobileready: 1,
           company_id: COMPANY_ID,
           count: 10,
           page: 2
    };

could be a webservice problem?

Are you sure that /someinfo/info work as you intended?