【发布时间】:2018-02-19 06:18:05
【问题描述】:
如何在角度 4 中突出显示多个选定的行,
在这里,我也可以使用复选框进行编辑并执行其他操作。我正在寻找的是突出显示选中的行。
<tbody>
<tr *ngFor='let row of rowData' [ngClass]="{ 'selected': row.selected }">
<td class="text-center>
<input type="checkbox" [(ngModel)]="row.selected" />
</td>
<td>
<input type="text" *ngIf="row.editable" [(ngModel)]="row.name" />
<ng-container *ngIf="!row.editable">{{row.name}}</ng-container>
<!-- You can use span or whatever instead of ng-container-->
</td>
<!-- Repeat for other cells -->
</tr>
</tbody>
【问题讨论】:
-
你有什么错误吗?可以查一下吗?
-
这只是我的代码的一个快照。我正在寻找突出显示多行的逻辑。
-
那么我的朋友在 SO 和 Google 上也有很多问题可用。你没有检查过吗? stackoverflow.com/questions/35167463/…
标签: html angular angular2-template