Infinite scroll with http request

Hi, I was just wondering if anyone has maybe some example of using an ionic infinite scroll with http request? would it be implemented in a similar way to angularjs infinite scroll? thank you.

See my codepen for showing the Github commits for the Ionic project using http requests to load data as you scroll.

http://codepen.io/gnomeontherun/pen/HJkCj

Can you show the markup too?

Markup is the HTML. I need to see the template and how you’ve setup the <ion-infinite-scroll> to have the whole picture. Even better is if you can create a codepen or something to demo it.

I can’t see this method on your controller!

Yup, use on-infinite="loadAllDeals()" to call the right method in your controller.

Also there is some code in the $http request that was specific to handling GitHub requests. I don’t know your API or if they have a Link header in the response, but the $scope.more value is being tracked against if the Link header contains a particular string or not. You will need to update the logic to track when your API has more pages or not. I don’t know how your API paginates, but infinite scroll makes sense to use with a paginated API.

thank you for all the comments , yes it’s not working with my API