Here is the HTML code snippet:
<ion-list radio-group [(ngModel)]="portion" (ionChange)="getPortionType()">
<ion-list-header>
Select Portion
</ion-list-header>
<ion-item *ngFor="let item of portionList">
<ion-label>{{item.portion}}
<p>{{item.price}} ₺</p>
</ion-label>
<ion-radio value="{{item.id}}"></ion-radio>
</ion-item>
<button *ngIf="portion != ''" ion-button block (click)="proceedToNextStep()">Proceed</button>
</ion-list>
You can see that I am using [(ngModel)] = "portion"
. When I retrieve this value, only the record ID is available. However, I want to access all the values from the selected radio button.
I specifically need to use {{item.portion}}
and {{item.price}}
. Please guide me on how to utilize these values in the .ts file.
Thank you for your help!