title: how to get array index in angular 5 html?
body: <p>i have one array and i want display array index and it's value also in angular 5 html, here is my array,</p>
  
  <pre><code>Anil K Chaudhary
  0: {is_present: "1", name: "Anil K Chaudhary", date: "22"}
  1: {is_present: "0", name: "Anil K Chaudhary", date: "20"}
  
  Laxman J chavda
  0: {is_present: "0", name: "Laxman J chavda", date: "22"}
  1: {is_present: "1", name: "Laxman J chavda", date: "20"}
  </code></pre>
  
  <p>below is my html code,</p>
  
  <pre><code>&lt;tr *ngFor = "let getAttendanceData_new of getAttendanceData[key]"&gt;
    &lt;td&gt;{{getAttendanceData_new}}&lt;/td&gt;   // i want to display array Index here. (e.g "Anil K Chaudhary", "Laxman J Chavda")
  
    &lt;!-- ======== AND ALSO WANT HERE THEIR VALUE ======== --&gt;
    &lt;td *ngFor="let getDays_new of getDays;let i = index"&gt;
      &lt;b *ngIf="getAttendanceData.is_present == 1 &amp;&amp; getDays_new == getAttendanceData.date" style="color:green"&gt;P&lt;/b&gt;
      &lt;b *ngIf="getAttendanceData.is_present == 0 &amp;&amp; getDays_new == getAttendanceData.date" style="color:lightgrey"&gt;A&lt;/b&gt;
    &lt;/td&gt;
  
  &lt;/tr&gt;
  </code></pre>