Failed to use next-previous in ion-slide-box with differet instances


#1

Hello,

I have 3 ion-slide-box. Everyone has 3 items.

I created buttons Next and back to simulate slide by pressing buttons.

but delegate-handle doesn’t work. I get:

Delegate for handle "slider1" could not find a corresponding element with delegate-handle="slider1"! next() was not called!

I created directive but when I press on Next, it moves all 3 sliders.

This is what I have so far:

scope.nextSlider = function(sliderId){
         $timeout(function(){
             $ionicSlideBoxDelegate.$getByHandle(sliderId).next();
      }, 1000);       
      }
      
       scope.prevSlider = function(sliderId){         
         $timeout(function(){
             $ionicSlideBoxDelegate.$getByHandle(sliderId).previous();
      }, 1000);         
      } 

Template

 <ion-slide-box delegate-handle="{{sliderId}}" 
                       on-slide-changed="slideHasChanged(index)" 
                       show-pager="false">
      <ion-slide ng-repeat="color in colors">        
             <!-- -->
        </ion-slide>
    </ion-slide-box>

And this is a DEMO I play with

I didn’t find any other example that works.

[EDIT]

Opened Bug 1865

Thanks,