@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