infinite-slider
infinite-slider copied to clipboard
Is it possible to add slides dynamically?
Hi! I have tried to add some slides dynamically by
$scope.listData.items.push({
img: 'http://farm4.staticflickr.com/3455/3372925208_e1f2aae4e3.jpg',
link: 'http://flic.kr/p/69489U'
});
after page is already rendered. And nothing works. Just wanted to know, either this functionality is possible and I am doing something wrong or it is not supposed to work like this? //BR
I haven't tried it before. If can give me a link to a plunk I will take a look at it.
Here is link. Unfortunately, on Plunker for some reason sliding doesn't work, but it doesn't matter. Click on click me and new picture will be added behind the existing not next to it.
http://plnkr.co/edit/XhNBuMu8uEDta4R25MDD
Thanks, I think this is a bug, and it seems like there might be a bug that requires disable-drag="false" on the infinite-slider element as well.
I got them working dynamically with an ng-if after data is ready, but there's another issue on mobile when I use google maps in the background - line 211 infinite-slider.js:211 Uncaught TypeError: Cannot read property 'x' of null. It breaks the vertical scroll after a few clicks.