Reputation: 67
- *ngFor="let profile of allSupprotProfiles
- *ngFor="let columnName of defaultColumns
<tr> <th>{{columnName}}</th> <td>{{ profile.{{columnName}}
}}</td> </tr>
How can we concatenate with profile object?
Upvotes: 0
Views: 2148
Reputation: 2487
you can try this
<div *ngFor="let profile of allSupprotProfiles">
<div *ngFor="let columnName of defaultColumns >
<tr> <th>{{columnName}}</th> <td>{{ profile[columnName] }}</td> </tr>
</div>
</div>
Upvotes: 3
Reputation: 2943
If you want to read field value from the object, which you seems to be trying to do, you should use regular Javascript syntax:
{{ profile[columnName] }}
Upvotes: 1