Removing slide from ionic slide box causes issues, how to?


#1

i have this demo: http://codepen.io/patrioticcow/pen/vOWZoJ?editors=101
towards the end there is this code

$scope.slideChanged = function(index) {
    //$scope.data.slides.splice(index, 1);
};

as is, the slide works great. but if i uncomment the code, the slider breaks.

my goal is to remove the slide once is has been swiped away.

any ideas?


#2

try to call
the update function after slicing:
http://ionicframework.com/docs/api/service/$ionicSlideBoxDelegate/


#3

tried that, no success


#4

only found in that time a very bad solution:

adding ng-if to the whole slidebox and hide it after slide changeā€¦
and the index represents the current index so you need to splice index - 1


#5

something rather then nothing.

thanks