Change Slide from a Slide-box

Hello Guys,

What i want to do is not only to change the slide from a Slide-box, but I will explain it to you:

I got a View in the back and on load from this View a Modal is poping up and this Modal has 2 Slider,
Gallery and Offer, as same as the Main-view and now i want to change the Views active Slide when the slider is changed in the Modal View.

I hope i explained it well.

Please help me guys.

Greetz,

Bernhard

Can you post a Screenshot or something else, to demonstrate your problem better? What isn’t working?

I think you just need to get the SlideBoxDelegateHandle. Give your SlideBox in the main view a delegate name with the attribute “delegate-handle”:

delegate-handle="main-slide-box"

In your controller you have to inject the $ionicSlideBoxDelegate handle and get the delegate handle:

var mainDelegateHandle = $ionicSlideBoxDelegate.getByHandle("main-slide-box");

Now you add a “on-slide-changed” function to the slidebox you want to listen to:

on-slide-changed="gallerySlideChanged($index)"

In your controller you add this function and chenge the slide of the main Slidebox:

function gallerySlideChanged(activeSlide) {
    mainDelegateHandle.slide( theIndexYouWantToSlideTo );
}

I hope this will help you

Thank you a lot!

This helped me! :slight_smile: