Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not swipe completely when used with ng-repeat #25

Open
samarthagarwal opened this issue Feb 19, 2016 · 12 comments
Open

Does not swipe completely when used with ng-repeat #25

samarthagarwal opened this issue Feb 19, 2016 · 12 comments

Comments

@samarthagarwal
Copy link

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 samarthagarwal changed the title Does not show up in mobile device Does not swipe completely Feb 19, 2016
@samarthagarwal samarthagarwal changed the title Does not swipe completely Does not swipe completely when used with ng-repeat Feb 19, 2016
@olzii
Copy link

olzii commented Feb 24, 2016

We have same issue, did you find solution ?

@samarthagarwal
Copy link
Author

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

@HugoHeneault
Copy link

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

@scripter-co
Copy link

+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.

@jimmyleo85
Copy link

@scripter-co Thanks!!!

@thomaskanzig
Copy link

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

Help me please!!!!

@etoah
Copy link

etoah commented Jun 17, 2016

@scripter-co Thanks!!!

1 similar comment
@justwezzz
Copy link

@scripter-co Thanks!!!

@pepamonsegur
Copy link

@scripter-co Thanks!!!!

@emblem-nyc
Copy link

@scripter-co Thank you so much!

@WillisYe
Copy link

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>

@mrugesh008
Copy link

@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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests