mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -103,7 +103,7 @@ export class RadioGroup {
|
||||
let oldVal = this.value;
|
||||
|
||||
// set the radiogroup's value
|
||||
this.value = val || '';
|
||||
this.value = isDefined(val) ? val : '';
|
||||
|
||||
this.updateValue();
|
||||
|
||||
|
||||
@@ -34,6 +34,13 @@ class E2EApp {
|
||||
|
||||
this.relationship = 'enemies';
|
||||
|
||||
|
||||
this.items = [
|
||||
{ description: 'value undefined', value: undefined },
|
||||
{ description: 'value false string', value: 'false' },
|
||||
{ description: 'value false boolean', value: false },
|
||||
{ description: 'value 0', value: 0 },
|
||||
];
|
||||
}
|
||||
|
||||
setApple() {
|
||||
|
||||
@@ -99,4 +99,18 @@
|
||||
<code><b>pet:</b> {{pet}}</code>
|
||||
</div>
|
||||
|
||||
<ion-list radio-group [(ngModel)]="someNumber">
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-label>
|
||||
{{ item.description }}
|
||||
</ion-label>
|
||||
|
||||
<ion-radio [value]="item.value"></ion-radio>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<div padding>
|
||||
<code><b>someNumber:</b> {{someNumber}}</code>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user