" /> " /> "/>

Getting a NaN in angular materialize index tabel

40 Views Asked by At

I have a table and data in in and I want to have one column as a number of table, index of table. But getting NaN

<ng-container matColumnDef="index">

     <th mat-header-cell *matHeaderCellDef mat-sort-header> Nr </th>
                    <td mat-cell *matCellDef="let element; let i = index;">
                      {{i+1}}
                    </td>
                  </ng-container>`

                    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
                <tr mat-row *matRowDef="let row; columns: displayedColumns; let i = index;"></tr>
              </table>

help me to solve it please.

0

There are 0 best solutions below