title: Ionic 2 *ngFor loop if index 3
body: <p>In my sidemenu template, I am using a ngFor loop to display all the items. Please see below:-</p>
  
  <pre><code> &lt;ion-item menuClose ion-item *ngFor="let page of pages" (click)="openPage(page)"&gt;
    &lt;ion-icon [name]="page.icon" item-left&gt;&lt;/ion-icon&gt;
    {{page.title | translate}}
    &lt;/ion-item&gt;
  </code></pre>
  
  <p>But I want one menu item that will have a different callback function, given below: - </p>
  
  <pre><code>&lt;ion-item menuClose ion-item (click)="openAnotherPage(136379)"&gt;
    &lt;ion-icon name="home" item-left&gt;&lt;/ion-icon&gt;
    New Menu
    &lt;/ion-item&gt;
  </code></pre>
  
  <p>But the problem is I want the menu item that will call openAnotherPage in 3rd position.</p>
  
  <p>Currently 'page' having 8 rows and I am unable to invoke my 'New Menu' item in between the loop.</p>
  
  <p>Is it possible to check for index and update callback function and menu name?</p>
  
  <pre><code> &lt;ion-item menuClose ion-item *ngFor="let page of pages" **Like if index 3 **(click)="AnotheropenPage(page)" **and for the rest** (click)="openPage(page)"&gt;
  </code></pre>
  
  <p>Please suggest. </p>