@Charlie001 wrote:
What is the proper way to detect a change on a radio button in Ionic 2? The template looks like this:
<ion-list radio-group (change)="saveSettings();" [(ngModel)]="units"> <ion-item> <ion-label>Imperial (lbs)</ion-label> <ion-radio value="lbs"></ion-radio> </ion-item> <ion-item> <ion-label>Metric (kg)</ion-label> <ion-radio value="kg"></ion-radio> </ion-item> </ion-list>
The issue is the change event is emitted before the units variable is updated, which causes the previous value to be re-saved in the database, not the new radio selection.
Posts: 1
Participants: 1