I have multiple ion-slides
in the same view, but they all share the same slider of the last ion-slides
. So, if I slide one of them, the bullets of the pagers don’t change. If I slide the last ion-slides
, all the pagers change their bullets. I tried to use a controller and the “Controller as ctrl” form, but I get the same result. How can I fix that?
<div ng-repeat="mydata">
<div ng-controller="Controller as ctrl">
<ion-slides option="{pager:true}" slider="ctrl.slider">
</ion-slided>
</div>
</div>
.controller('Controller', ['$scope', function($scope)
{
var self = this;
this.slider;
this.activeIndex;
this.previousIndex;
$scope.$on("$ionicSlides.sliderInitialized", function(event, data){
self.slider = data.slider;
});
$scope.$on("$ionicSlides.slideChangeStart", function(event, data){
});
$scope.$on("$ionicSlides.slideChangeEnd", function(event, data){
self.activeIndex = data.activeIndex;
self.previousIndex = data.previousIndex;
});
}])