Looking for a way to not load all ion-slide-box slides up front


#1

I am needing to lazy load slides basically like this http://fundoo-solutions.github.io/angularjs-carousel/. As soon as I click on a slide all the slides are downloaded. I am wanting only the current slide and a couple ahead and a couple of previous slides to load when one is clicked.Any help would be appreciated.


#2

You could try this.

Basically it will hide and show slides depending if it is the previous, current, or next slide.


#3

Thanks for response. What I am trying do to however is not download all the images from the server at one time. If I had 100 image url’s in an array being displayed inside a ng-repeat I don’t want all 100 downloaded at once. I modified your example to show what I am talking about http://codepen.io/jmorrisIII/pen/nCfot?editors=101 . If you open chrome development and filter network traffic to images you see that all 12 are downloaded when you clear cache and refresh. If I arrive in the middle of the list I only want that image plus a couple after and a couple before then as I scroll download a few more ahead to keep up. If you view the network traffic while scrolling this example http://fundoo-solutions.github.io/angularjs-carousel/ it is basically doing what I am wanting. I am a noob so I may not have a clue as to what I am talking about.Thanks


#4

You can could do something like this, where it will only load 2 slides at first then the rest after a period of time.


#5

That trick is genius, thanks so much! It works perfectly, very noticeable performance improvement.


#6

I want to show all slide box one after other with a small gap. and the most imp thing is that i want it in vertical and in version 2