This is my code, kinda trick where I only have one slide and I do the infinite loop with it and I want to change content dynamically. So it seems like i have multiple slides but actually it’s one slide and content is taken dynamically from JSON
<ion-slides #originalslides class="top-slides" loop (ionSlidePrevEnd)="slideChanged( -1)" (ionSlideNextEnd)="slideChanged(1)" >
<ion-slide>
<img src="{{current}}">
</ion-slide>
</ion-slides>
slideChanged(step: number) {
//calculate current step so you can take data from json
this.slideStep = this.slideStep + step;
this.current = this.data[this.slideStep];
}
The problem I’m having is that my content is being dynamically changed but not displayed in a slide. When I change my slide obviously it goes to the same slide because it’s loop but my content is not displayed. Content is being displayed when I touch the slide/when I start to drag it.
How do I solve it?