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
There are quite a few old topics about "dynamic" slides or injecting slides into a slidebox. Most of these are based on pretty old versions of Ionic. I've created a new one that shows how to add a slide dynamically. This can be used in situations...
Reading time: 3 mins 🕑
Likes: 17 ❤
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.
wedgybo
February 11, 2015, 2:13pm
4
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.