Hey
I have a ion-slide-box currently with 3 test slides. I want to implement functionality to delete a slide, but even though I call $ionicSlideBoxDelegate.update(); after removing the item from the array with the slides it does not seem to be updated properly, and it skips to the third slide even when deleting the first. The slide disappears, but it’s not possible to swipe to other slides. When looking at the html generated I can see that the data-index and translation of the slides is not updated, as well as the width of the entire slider. I tried to call update on on-slide-changed, and then the slides are updated when I try to swipe a couple of times, but I can’t use it like that.
Can anyone see what I have done wrong? Or why it is updated when swiping towards the empty area at the end of the slider?
<ion-slide-box active-slide="activeSlide" show-pager="false" on-slide-changed="slideChanged()">
<ion-slide ng-repeat="story in stories">...</ion-slide>
</ion-slide-box>
Controller:
$scope.rejectStory = function(index) {
$scope.stories.splice(index, 1);
$ionicSlideBoxDelegate.update();
};
$scope.slideChanged = function () {
$ionicSlideBoxDelegate.update();
};