美好的一天, 以下代码将切换ngfor行的所有图标。如何切换单击的图标?
<ng-template #clickState let-rowIndex="rowIndex" let-row="row" let-expanded ="expanded" ngx-datatable-cell-template >
<strong>{{row.dbColumn1}}</strong>
<i class="fa fa-external-link"
style="float:right;padding-top: 4px; vertical-align:bottom"
*ngIf="!clickState.clicked"
(click)="clickState.clicked=true"
(click)="onVisible($event,row.dbColumn1,row,rowIndex)">h</i>
<i class="fa fa-clone"
style="float:right;padding-top: 4px; vertical-align:bottom"
*ngIf="clickState.clicked"
(click)="clickState.clicked=false"
(click)="onVisible($event,row.dbColumn1,row,rowIndex)">h</i>
</ng-template>
感谢。 LHLK