I'd like to use content projection to "project" custom icons in an Angular data table I've made. I've attempted to make these icons conditional based on the data in a certain column. I am able to insert an icon into each column and row, but I am unable to figure out how to make these conditional.
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">
<ng-container
*ngTemplateOutlet="cellTemplate;
context: row[col.prop]">
</ng-container>
{{row[col.prop]}}
</td>
</tr>
</tbody>
</table>
app.component.html
<app-data-table
[data]="data"
[cols]="cols"
[cellTemplate]="cellTemplate">
<ng-template #cellTemplate let-value>
<img class="rimg1"
[src]="com"
alt="Complete"
*ngIf="value === 'Completed'/>
</ng-template>
</app-data-table>
table.component.ts
export class tableComponent {
@Input() cellTemplate: TemplateRef<any>;
}