Being new to Ionic 2, I can't quite figure out how to get the values from a radio button.
in the template I have
<ion-list radio-group>
<ion-item>
<ion-label>I am acting on behalf of myself</ion-label>
<ion-radio checked="true" value="self"></ion-radio>
</ion-item>
<ion-item>
<ion-label>I am acting as an agent</ion-label>
<ion-radio value="agent"></ion-radio>
</ion-item>
</ion-list>
<button full (click)="handleResult()">OK</button>
And in the JS,
handleResult() {
// access ion-radio items and check which value is checked
}
Can someone put me on the right path here please.
Thanks