How to get attribute value from ionic option
I have the following selection menu. I want to access attr.id in TypeScript -Class. Is it possible? I haven't found a way. friends
multidimensional array.
<ion-item>
<ion-label>Service</ion-label>
<ion-select [(ngModel)]="selectService" name="service" (ionChange)="serviceSelected($event)">
<ion-option selected disabled value="">Service auswählen:</ion-option>
<ion-option *ngFor="let friend of friends" [attr.id]="friend[3]">{{friend[1]}}: {{friend[2]}} </ion-option>
</ion-select>
</ion-item>
TS
serviceSelected(friend)
{
// How can I get the attribute "id" from the selected value here?
}
+3
source to share
No one has answered this question yet
Check out similar questions: