angular-swiper
angular-swiper copied to clipboard
Dots pagination or autoplay to next slides doesn't work when using data from ng-repeat
I'm trying to put the data from $http.get to a slider but in the first load the at pagination dots and the view only the first slide appears I cannot swipe to others, also the data are loaded into DOM but doesn't appear on web. After some time they show up but when I refresh the data still the same result.
<ks-swiper-container autoplay="3000" show-nav-buttons="false" pagination-is-active="true" direction="vertical" swiper="swiper">
<ks-swiper-slide ng-repeat="item in news">
<a href="{{item.url}}">
<img src="{{item.attachments[0].url}}">
<h3 class="slide-Caption"> {{item.title}} </h3>
</a>
</ks-swiper-slide>
</ks-swiper-container>
same too
same
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>
nav buttons are not working properly and I'm unable to see pagination buttons