title: Angular Run *ngFor on particular Indexes Defined in Array
body: <p>I am using a *ngFor loop but I only want the loop to run on particular indexes defined in an array (i.e. indexArray = [454,640]).</p>
  <p>If I try this, and the indexArray has two or more elements, it does not work. But If the array has only one element (i.e. indexArray=[565]) it works.</p>
  <pre><code>&lt;div *ngFor=&quot;let item of items; index as i&quot;&gt;
    &lt;table *ngIf=&quot;i == indexArray&quot;&gt; 
  </code></pre>