Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular ngfor counter

<tr *ngFor="let ... of ...; let i = index">
// you can use {{i}} then to get the number of the row

// e.g:
<tr *ngFor="let adjustment of adjustments; let i = index">
   <td *ngFor="let blade of blades; let j = index">

      <span> Counter = {{ (i * blades.length) + j }} </span>

   </td>
</tr>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angular #ngfor #counter
ADD COMMENT
Topic
Name
7+2 =