-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I figured that out, so if someone had to do it this way, I guess it should be somewhat done the following way: |
Beta Was this translation helpful? Give feedback.
I figured that out, so if someone had to do it this way, I guess it should be somewhat done the following way:
<clr-dg-column
*ngFor="let key of initial.columns"
clrDgField="row.{{initial.columns.indexOf(key)}}"
>
<div style=" text-transform: capitalize;">{{key.toLowerCase()}}</div>
</clr-dg-column>
<clr-dg-row
*clrDgItems="let rows of initial.rows"
[clrDgItem]="rows">
<clr-dg-cell *ngFor="let columnKey of initial.columns"> {{ rows.row[initial.columns.indexOf(columnKey)]}} </clr-dg-cell>
</clr-dg-row>
(I had to change the example a little bit to fit my needs)