隨着angular2是否有可能獲得目前*ngFor
索引值點擊? 我有一個客戶列表,我想獲得他們的索引值。如何獲得當前索引點擊angular2
<button ion-item *ngFor="let customer of customers" (click)="showRadio()">
{{ customer.customer_name }}
</button>
showRadio(currentIndex) {
//................
for(var j=0; j<myResult[currentIndex].bookingIds.length; j++) {
alert.addInput({
type: 'radio',
label: myResult[currentIndex].bookingIds[j],
value: myResult[currentIndex].bookingIds[j],
checked: false
});
}