how to define index in angular material table

后端 未结 5 886
栀梦
栀梦 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:48

    For anyone who has set the multiTemplateDataRows property of mat-table to true, you can't use index. Instead you have use either dataIndex or renderIndex.

    {{i}}
    

    See https://github.com/angular/material2/issues/12793

提交回复
热议问题