Infinite Slide Box

I am building an app with the ion-slide-box and I wanted to know if there is a way to essentially have an infinite slide box. I dynamically add new slides and then do


but the problem is that it keeps all the old slides so eventually there will be too many to keep in memory. Ideally I would be able to remove slides as well without affecting which slide the user is currently looking at. Essentially I want to be able to do something like this:

var current = $ionicSlideBoxDelegate.currentIndex();
// remove first slide (this I can handle w/o changes in ionic)
// add new slide at the end (again, something I can handle)
// set current index to be current - 1 (this is the issue; no API in ionic)

Of course, it would be even better if the $ionicSlideBoxDelegate had an API for adding/removing slides, but the easier thing for the short term is just to expose a way to set the current index without any other changes so that I can add/remove slides dynamically and it won’t affect what the user is currently looking at.

Hi !

I’m looking for the same behaviour : infinite slidebox with smooth performance !

Did you already see this thread What should I do if I want to show thousands of pages in a slide-box ?

1 Like

Thanks, ghz! I did not see that but it actually has a solution I can work with. Basically just use 3 slides with does-continue: true and then dynamically change what is on each slide offscreen. Cool. I can work with this!

Thanks! You can close this.