Angular material 能否将垫工具提示添加到垫表列的标题?
我希望能够添加一个工具提示,当鼠标悬停在mat表格中列的标题上时显示该提示。 有没有办法做到这一点,因为当我添加mat工具提示指示器时它不会显示Angular material 能否将垫工具提示添加到垫表列的标题?,angular-material,tooltip,mat-table,Angular Material,Tooltip,Mat Table,我希望能够添加一个工具提示,当鼠标悬停在mat表格中列的标题上时显示该提示。 有没有办法做到这一点,因为当我添加mat工具提示指示器时它不会显示 <table mat-table [dataSource]="marketDataSource" matSort multiTemplateDataRows class="w-100"> <!-- Status Status --> <ng-container m
<table mat-table [dataSource]="marketDataSource" matSort multiTemplateDataRows class="w-100">
<!-- Status Status -->
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header matTooltip="Info about the action">
Status
</th>
<td mat-cell *matCellDef="let element">
<span>
<mat-slide-toggle color="primary"></mat-slide-toggle>
</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="marketDisplayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let element; columns: marketDisplayedColumns;">
</table>
地位
导入MatTooltip
组件上的模块。ts
import { MatTooltipModule } from '@angular/material/tooltip';
什么东西没有显示出来?您的代码运行良好。在stackblitz上看到:我忘了导入工具提示模块。从“@angular/material/tooltip”导入{MatTooltipModule};没问题,伙计。我想我们应该为搜索添加一个答案