Use ViewChild for dynamic elements - Angular 2 & ionic 2 : <p>I want use multiple <a href="https://ionicframework.com/docs/api/components/slides/Slides/" rel="noreferrer">IonicSlides</a> that I added thease dynamically, So I can't use viewChild . please suggest a way for this problem. </p>

<p><strong>Template.html :</strong> </p>

<pre><code>&lt;div *ngFor="let name of title;let i = index;"&gt;

    &lt;ion-slides  id="something" #slides  &gt;
        //some code
    &lt;/ion-slides&gt;
&lt;/div
</code></pre>

<p><strong>Component.ts :</strong></p>

<pre><code>  @ViewChild('slides') slides: QueryList&lt;Slides&gt;;

  ....

  ngAfterViewInit(){



        setTimeout( ()=&gt;{

         alert(this.slides.toArray()); //this line rise error 


        },3000);


  }
</code></pre>

<p><strong>Error :</strong> </p>

<blockquote>
  <p>_this.slides.toArray is not a function</p>
</blockquote>
