I want to be able to have to option of adding icons/progress-bar in the rows of my reusable Angular table component, however I am having a hard time implementing this. I've tried adding ng-content in my table.component.html, however this only projects content once. How would I approach this?
table.component.html
<table>
<thead>
<tr>
<th *ngFor="let col of cols"
(click)="selectColHeader(col.prop);
col.enableSort && sort(col.prop)">
{{col.header}}
<input type="text"
class="ds-c-field"
[(ngModel)]=fields[col.prop]
(click)="selectColInput(col.prop, $event)"
*ngIf=col.enableFilter/>
<img
class="arrow"
*ngIf="col.enableSort && col.prop === selectedColHeader"
[src]="direction === 'asc' ? upArrowPath : downArrowPath"/>
</th>
</tr>
</thead>
<tbody *ngFor="let row of data">
<tr>
<td *ngFor="let col of cols">
{{row[col.prop]}}
<ng-content></ng-content>
//icon projected here
</td>
</tr>
</tbody>
</table>
app.component.html
<app-data-table [data]=data [cols]=cols>
<img src="#"/> //custom icon or progress-bar here
</app-data-table>