I want to use multiple IonicSlides that I added dynamically. But I can't use @viewChild
. please suggest a way to resolve this problem.
Template.html :
<div *ngFor="let name of title;let i = index;">
<ion-slides id="something" #slides>
//some code
</ion-slides>
</div
Component.ts :
@ViewChild('slides') slides: QueryList<Slides>;
....
ngAfterViewInit(){
setTimeout(()=>{
alert(this.slides.toArray()); //this line rise error
}, 3000);
}
Error :
_this.slides.toArray is not a function