Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Slide.SlideTo() not working everithing

$
0
0

@ixcayau wrote:

Hi! This is some confusing…
but the next code just working when it is out of the condition “if”:

            let cardsSliderArray = this.slides.toArray(); // safely get QueryList's _results
            let cardSlider = cardsSliderArray[index];
            cardSlider.slideTo( key.indexOf(level + 'XP'), 500);

but i need that code inside of the “forEach” and the slides never change, here is an example:

 export class BenefitsPartnersPage {

  @ViewChildren('slidePrincipal') slides: QueryList<Slides>;

 setSlide(offers, index) {     // my function

 // if i put my code here... works perfectly

    if (!this.runed[index]) {
      var key = Object.keys(offers);

      this.neccesary.forEach((level) => {
        if (key.indexOf(level + 'XP') > -1 && !(this.runed[index])) {
            this.runed[index] = key.indexOf(level + 'XP');

           // i need my code here

        }
      })
    }
  }
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>