infinite-slider icon indicating copy to clipboard operation
infinite-slider copied to clipboard

Is it possible to add slides dynamically?

Open TheAvalanche opened this issue 10 years ago • 4 comments

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

TheAvalanche avatar Dec 29 '14 20:12 TheAvalanche

I haven't tried it before. If can give me a link to a plunk I will take a look at it.

gilbox avatar Dec 29 '14 20:12 gilbox

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

TheAvalanche avatar Dec 30 '14 10:12 TheAvalanche

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.

gilbox avatar Dec 30 '14 16:12 gilbox

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.

evanjmg avatar Jan 30 '16 22:01 evanjmg