Slide to ion-slide with custom ID instead of index value


#1

Hi,

I have products which are shown in slider, but when i click on product outside ion-slide-box, i want that slider go to slide with that product ID.

The problem is $ionicSlideBoxDelegate.slide(to, [speed]) accepts only the index of slide. I don’t know index value and I’m using ng-repeat and i need to go to that slide based on ID.

I tried to create an array which associate product ID with slide index, but the problem is that array get enormous, and slow to iterate.

Please help!
Thank you.


#2

Solved, i found a way to do it. Need testing though


#3

How did you solve it? Other people have similar issues and find pages like this from Google. Just saying “Solved” doesn’t help them.


#4

Can you share your solution, please?