File tree Expand file tree Collapse file tree 4 files changed +33
-5
lines changed
static/usage/v8/picker-legacy Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 11``` ts
22import { Component } from ' @angular/core' ;
3- import { IonButton } from ' @ionic/angular/standalone' ;
4- import { PickerController } from ' @ionic/angular' ;
3+ import { IonButton , PickerController } from ' @ionic/angular/standalone' ;
54
65@Component ({
76 selector: ' app-example' ,
Original file line number Diff line number Diff line change 22import { Component } from ' @angular/core' ;
33import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
44
5+ interface PickerValue {
6+ languages: {
7+ text: string ;
8+ value: string ;
9+ };
10+ }
11+
512@Component ({
613 selector: ' app-example' ,
714 templateUrl: ' example.component.html' ,
@@ -42,7 +49,7 @@ export class ExampleComponent {
4249 },
4350 {
4451 text: ' Confirm' ,
45- handler : (value : any ) => {
52+ handler : (value : PickerValue ) => {
4653 console .log (` You selected: ${value .languages .value } ` );
4754 },
4855 },
Original file line number Diff line number Diff line change 22import { Component } from ' @angular/core' ;
33import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
44
5+ interface PickerValue {
6+ languages: {
7+ text: string ;
8+ value: string ;
9+ };
10+ }
11+
512@Component ({
613 selector: ' app-example' ,
714 templateUrl: ' example.component.html' ,
@@ -40,7 +47,7 @@ export class ExampleComponent {
4047 },
4148 {
4249 text: ' Confirm' ,
43- handler : (value : any ) => {
50+ handler : (value : PickerValue ) => {
4451 console .log (` You selected: ${value .languages .value } ` );
4552 },
4653 },
Original file line number Diff line number Diff line change 22import { Component } from ' @angular/core' ;
33import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
44
5+ interface PickerValue {
6+ meat: {
7+ text: string ;
8+ value: string ;
9+ };
10+ veggies: {
11+ text: string ;
12+ value: string ;
13+ };
14+ crust: {
15+ text: string ;
16+ value: string ;
17+ };
18+ }
19+
520@Component ({
621 selector: ' app-example' ,
722 templateUrl: ' example.component.html' ,
@@ -70,7 +85,7 @@ export class ExampleComponent {
7085 },
7186 {
7287 text: ' Confirm' ,
73- handler : (value : any ) => {
88+ handler : (value : PickerValue ) => {
7489 console .log (` You selected a ${value .crust .text } pizza with ${value .meat .text } and ${value .veggies .text } ` );
7590 },
7691 },
You can’t perform that action at this time.
0 commit comments