Ionic2 slider with loop option activated


#1

Hi!!

I´m trying to run an ionic app in a device but the index returned with slider.getActiveIndex() is diferents that when I run the app in a simple server.

I´ve researched and I found that this method doesn´t work propertly when option loop is set.

My code:

let currentSlideIndex = me.slider.getActiveIndex();

this sentence returns 2 the first time that the slider is loaded, but only in android devices and when option loop is set in the slider:

  slideOption = {
        runCallbacksOnInit: false,
        loop: true
    };

Could anybody help me?

My ionic Info :

Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v7.3.0


#2

We can’t really help from what you’ve told us. We need code, something to test or look at.