【发布时间】:2021-04-03 06:57:57
【问题描述】:
HTML
<p-table #dt1 [columns]="cols" [value]="cars1">
<ng-template pTemplate="header" let-columns>
<tr>
<th *ngFor="let col of columns"> {{col.header}} </th>
</tr>
</ng-template>
</p-table>
TS
export class Table implements OnInit {
cols: any[];
ngOnInit() {
this.cols = [
{ field: 'year', header: 'Year' },
{ field: 'brand', header: 'Brand' },
{ field: 'color', header: 'Color' }
];}}
我只想为品牌列显示工具提示
在 Angular 9.1.3 上使用 PrimeNG 9.2.1 版本
【问题讨论】:
标签: html angular typescript primeng primeng-datatable