單擊提交按鈕時需要傳遞所選單選按鈕的值
<!--Starts Location Select Popover -->
<ion-list>
<ion-list-header>
<h5> Select Location</h5>
</ion-list-header>
<ion-item *ngFor="let store of storeLocations">
<ion-label>{{store?.storeName}}</ion-label>
<input type="radio" slot="end" value="{{store}}" />
</ion-item>
<ion-button expand="block" (click)="dismissLocationSelectPopover(store)">Submit Location
</ion-button>
</ion-list>
<!--Ends Location Select Popover -->
uj5u.com熱心網友回復:
[(ngModel)]不支持。最好(click)改用。
HTML
<input type="radio" slot="end" value="{{storeLoc.storeName}}" id="{{storeLoc.storeName}}"(click)="storeSelected(storeLoc)" />
TS
storeSelected(storeLoc) {
this.storeSelected = storeLoc;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/353975.html
