columnClass: string[] = 'name‘、'email’、'phn‘、'city’、'state‘、'’、'w-40';
<td *ngFor="let col of columnClass" class="pr-20 {{col}}">
string[]在一个component.ts中,html在另一个中
发布于 2020-10-16 15:52:51
您需要使用绑定到类来在其中使用变量。
<td *ngFor="let col of columnClass" class="pr-20" [class]="col">https://stackoverflow.com/questions/64392321
复制相似问题