I am having an issue when adding index to my table rows. I have assigned index value like this:
<ng-container matColumnDef="id">
<mat-header-cell *matHeaderCellDef>#</mat-header-cell>
<mat-cell *matCellDef="let i = index"> {{i+1}} </mat-cell>
</ng-container>
This solution is working on one table but on the second table it is returning NaN. Does anyone knows how to fix this?
On the second table I am using expandable rows so I have added multiTemplateDataRows attribute. Everything else is the same. I am using Material Design v7.11