How do you display the serial number of a nested table that uses the nz-zorro frame in an angular project?

document link nz-zorro
Code Screenshot:
:
document screenshot as above. Now I want to add the serial number to the table outside, and find that the original method of writing cannot be used. The previous code for writing serial number is like this

.
<tr *ngFor="let data of basicTable.data;let i = index">
 <td width="10%">{{i+1}}</td>
    ...
</tr>

you can define the sequence number through index. However, it is found that the tables outside the nested tables cannot be written in this way.
the solution I"ve come up with is to add a sequence number when the backend returns the data, or manually add the sequence number by traversing the data. But I still think there"s another way. Angular contact time is not long, hope to have other ideas of friends to guide.

Mar.23,2021

https://ng.ant.design/compone.
has ready-made tree table

Menu