mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
chore(angular): remove radio value accessor (#28386)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
@ -48,6 +48,12 @@
|
||||
<ion-checkbox formControlName="checkbox"> Checkbox </ion-checkbox>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-radio-group formControlName="radio">
|
||||
<ion-radio value="nes">Radio</ion-radio>
|
||||
</ion-radio-group>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Min</ion-label>
|
||||
<ion-input formControlName="inputMin" type="number"></ion-input>
|
||||
|
||||
@ -20,7 +20,8 @@ export class FormComponent {
|
||||
input2: ['Default Value'],
|
||||
inputMin: [1, Validators.min(1)],
|
||||
inputMax: [1, Validators.max(1)],
|
||||
checkbox: [false]
|
||||
checkbox: [false],
|
||||
radio: [undefined]
|
||||
}, {
|
||||
updateOn: typeof (window as any) !== 'undefined' && window.location.hash === '#blur' ? 'blur' : 'change'
|
||||
});
|
||||
@ -44,7 +45,8 @@ export class FormComponent {
|
||||
toggle: true,
|
||||
input: 'Some value',
|
||||
input2: 'Another values',
|
||||
checkbox: true
|
||||
checkbox: true,
|
||||
radio: 'nes'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -85,6 +85,20 @@
|
||||
<ion-note slot="end">{{checkbox}}</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-radio-group value="nes" [(ngModel)]="radio" id="first-radio">
|
||||
<ion-radio value="nes">Radio</ion-radio>
|
||||
</ion-radio-group>
|
||||
<ion-note slot="end" id="radio-note">{{radio}}</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item color="dark">
|
||||
<ion-radio-group value="nes" [(ngModel)]="radio">
|
||||
<ion-radio value="nes">Radio Mirror</ion-radio>
|
||||
</ion-radio-group>
|
||||
<ion-note slot="end">{{radio}}</ion-note>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
<p>
|
||||
<ion-button (click)="setValues()" id="set-button">Set values</ion-button>
|
||||
|
||||
@ -9,6 +9,7 @@ export class InputsComponent {
|
||||
datetime? = '1994-03-15';
|
||||
input? = 'some text';
|
||||
checkbox = true;
|
||||
radio? = 'nes';
|
||||
toggle = true;
|
||||
select? = 'nes';
|
||||
changes = 0;
|
||||
@ -18,6 +19,7 @@ export class InputsComponent {
|
||||
this.datetime = '1994-03-15';
|
||||
this.input = 'some text';
|
||||
this.checkbox = true;
|
||||
this.radio = 'nes';
|
||||
this.toggle = true;
|
||||
this.select = 'nes';
|
||||
}
|
||||
@ -27,6 +29,7 @@ export class InputsComponent {
|
||||
this.datetime = undefined;
|
||||
this.input = undefined;
|
||||
this.checkbox = false;
|
||||
this.radio = undefined;
|
||||
this.toggle = false;
|
||||
this.select = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user