Paging with SlideBox

Hi all,

I am using Ionic SlideBox to show images. currently I am showing 10 images and there are more imags to be fetched from remote server.

I am looking to fetch more images from remote server when the user reaches the last slide of the slidebox?

How can I implement the paging logic here? I am confused and not sure how to do this in Ionic way.

Any kind of help is appreciated.

@Calendee has a pretty good demo of how to do this

Thanks @mhartington. I already checked it and my requirement is different that this.

I have done most of my code part. I can get the current index of slide and can use slidechanged event.

I want to know how to identify if the user is on the last slide of slide box.

BTW, thanks @Calendee for this good demo.

Use on-slide-changed="updateSlides($index, items)" Then you should be able to write a function to check what slide you are on relative to the length of your current items

$scope.updateSlides = function (index, items) {
  if (index === items.length - 1) {
    loadMoreItems();
  }
}

Y’all should really look at the version posted by @zarko . I think it’s better than mine : Dynamic Slides

2 Likes

Thanks @wedgybo and @Calendee.

This is what exactly I need.

Thanks alot.

1 Like

I have added these 2 codepens to my list. :smile: