My Angular project is using Angular Material 16x, but for some reason, the matToolTip is not displaying at all. I have experimented with various versions, including a basic matTooltip="hello world", but I just can't seem to get it to work. I have come across conflicting information regarding whether a matTooltip can be placed inside an ng-container, with some examples showing that it is possible. Can anyone pinpoint what might be going wrong?
--my component
<mat-card class="mat-form-field">
<mat-card-content>
<table
style="width: 100%"
mat-table
matSort
matSortActive="created"
matSortDisableClear
matSortDirection="asc"
[dataSource]="dataSource"
multiTemplateDataRows="true"
>
<ng-container matColumnDef="statusDot">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let row">
<img
src="../../../assets/images/Basic_green_dot.png"
alt=""
matTooltip="tooltipTpl"
style="width: 15px; height: 15px"
/>
</td>
</ng-container>
<ng-template #tooltipTpl>
<div style="background: gray">
<div>This is a template!</div>
</div>
</ng-template>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 100, 1000]"></mat-paginator>
</mat-card-content>
</mat-card>