0
2顯示隱藏我想基於索引Angularjs基於索引
template
<tbody>
<tr *ngFor="#item of itemList; #i = index">
<td class="text-center">{{i+1}}</td>
<td class="text-center">{{item.name}}</td>
<td class="text-center">{{item.email}}</td>
<td class="text-center">{{item.city}}</td>
<td class="text-center"><span (click)="removeItem($index)" class="glyphicon glyphicon-remove"></span>
<span class="glyphicon glyphicon-plus" (click)="onSelect(i)"></span>
<td [hidden]="IsHidden">{{item.orderid}}</td>
</tr>
.ts
IsHidden= true;
onSelect(index){
console.log(this.itemList[index]);
this.IsHidden = !this.IsHidden;
}
顯示隱藏DIV當過我點擊一日一它全部顯示tr hidden
字段。
我該如何解決這個問題?
沒有它不工作 –
隱藏顯示沒有工作,現在總是顯示 –
雅它的工作怎麼只有一個顯示在時間 –