angular-swiper icon indicating copy to clipboard operation
angular-swiper copied to clipboard

Does not swipe completely when used with ng-repeat

Open samarthagarwal opened this issue 9 years ago • 12 comments

The swipe functionality is not working properly, it always comes back to the first slide no matter how hard I try to swipe it away. Also the controls to change slides are not working.

Here is my code.

`

`

samarthagarwal avatar Feb 19 '16 09:02 samarthagarwal

We have same issue, did you find solution ?

olzii avatar Feb 24 '16 16:02 olzii

No, But it works fine if you do not use a $scope variable for ng-repeat. I instead used Ionic Slide Box.

samarthagarwal avatar Feb 24 '16 18:02 samarthagarwal

Slidebox doesn't show multiple sliders at the same time. I have this issue too. Any ideas? :cry:

HugoHeneault avatar Feb 26 '16 17:02 HugoHeneault

+1 there is an issue with using $scoped variables. A workaround I've found is to re-initialise the observers once the slider is ready. You can do the following:

<ks-swiper-container swiper="swiper" on-ready="onReadySwiper(swiper)">

and in your controller

$scope.onReadySwiper = function(swiper){
        swiper.initObservers();
};

I'll take a further look to see what the actual solution is.

scripter-co avatar Mar 27 '16 23:03 scripter-co

@scripter-co Thanks!!!

jimmyleo85 avatar Mar 28 '16 13:03 jimmyleo85

Guys, swiper.initObservers(); don't work in Internet Explorar browser :( I also use with ng-repeat, but the images dont show.

Help me please!!!!

thomaskanzig avatar May 27 '16 14:05 thomaskanzig

@scripter-co Thanks!!!

etoah avatar Jun 17 '16 04:06 etoah

@scripter-co Thanks!!!

justwezzz avatar Sep 12 '16 11:09 justwezzz

@scripter-co Thanks!!!!

pepamonsegur avatar Sep 24 '16 22:09 pepamonsegur

@scripter-co Thank you so much!

emblem-nyc avatar Nov 15 '16 17:11 emblem-nyc

add ng-if, My code follow: <ks-swiper-container ng-if="home.bannerContent[0] && home.bannerContent[0].content.length>0" autoplay="3000" loop="true" on-ready="onReadySwiper(swiper)" pagination-is-active="true" > <ks-swiper-slide class="swiper-slide" ng-repeat="item in home.bannerContent[0].content"> <a ng-href="{{item.linkUrl}}"> <img ng-src="{{item.imgUrl}}" alt="" /> </a> </ks-swiper-slide> </ks-swiper-container>

WillisYe avatar Dec 29 '16 09:12 WillisYe

@scripter-co I tried using $scope.onReadySwiper = function(swiper) { swiper.initObservers(); }; . But I get an error saying Object doesn't support property or method 'initObservers'

mrugesh008 avatar Oct 30 '17 08:10 mrugesh008