how to define index in angular material table

后端 未结 5 888
栀梦
栀梦 2020-12-01 10:16

how should I define an index variable when angular material table is used as ngFor is not used in this table.

I did search for it in the documentation but index is

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 10:43

    Can you add index to let element; let i = index;" as you'd do with *ngFor?

    
    

    Or like so:

    
       Index 
      {{i}}
    
    

提交回复
热议问题