File tree Expand file tree Collapse file tree 4 files changed +44
-4
lines changed
static/usage/v8/picker-legacy Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 11``` ts
22import { Component } from ' @angular/core' ;
3- import { PickerController } from ' @ionic/angular' ;
3+ import { IonButton , PickerController } from ' @ionic/angular/standalone ' ;
44
55@Component ({
66 selector: ' app-example' ,
77 templateUrl: ' example.component.html' ,
8+ styleUrls: [' example.component.css' ],
9+ imports: [IonButton ],
810})
911export class ExampleComponent {
1012 constructor (private pickerCtrl : PickerController ) {}
Original file line number Diff line number Diff line change 11``` ts
22import { Component } from ' @angular/core' ;
3+ import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
4+
5+ interface PickerValue {
6+ languages: {
7+ text: string ;
8+ value: string ;
9+ };
10+ }
311
412@Component ({
513 selector: ' app-example' ,
614 templateUrl: ' example.component.html' ,
15+ styleUrls: [' example.component.css' ],
16+ imports: [IonButton , IonPickerLegacy ],
717})
818export class ExampleComponent {
919 isPickerOpen = false ;
@@ -39,7 +49,7 @@ export class ExampleComponent {
3949 },
4050 {
4151 text: ' Confirm' ,
42- handler : (value ) => {
52+ handler : (value : PickerValue ) => {
4353 console .log (` You selected: ${value .languages .value } ` );
4454 },
4555 },
Original file line number Diff line number Diff line change 11``` ts
22import { Component } from ' @angular/core' ;
3+ import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
4+
5+ interface PickerValue {
6+ languages: {
7+ text: string ;
8+ value: string ;
9+ };
10+ }
311
412@Component ({
513 selector: ' app-example' ,
614 templateUrl: ' example.component.html' ,
15+ styleUrls: [' example.component.css' ],
16+ imports: [IonButton , IonPickerLegacy ],
717})
818export class ExampleComponent {
919 public pickerColumns = [
@@ -37,7 +47,7 @@ export class ExampleComponent {
3747 },
3848 {
3949 text: ' Confirm' ,
40- handler : (value ) => {
50+ handler : (value : PickerValue ) => {
4151 console .log (` You selected: ${value .languages .value } ` );
4252 },
4353 },
Original file line number Diff line number Diff line change 11``` ts
22import { Component } from ' @angular/core' ;
3+ import { IonButton , IonPickerLegacy } from ' @ionic/angular/standalone' ;
4+
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+ }
319
420@Component ({
521 selector: ' app-example' ,
622 templateUrl: ' example.component.html' ,
23+ styleUrls: [' example.component.css' ],
24+ imports: [IonButton , IonPickerLegacy ],
725})
826export class ExampleComponent {
927 public pickerColumns = [
@@ -67,7 +85,7 @@ export class ExampleComponent {
6785 },
6886 {
6987 text: ' Confirm' ,
70- handler : (value ) => {
88+ handler : (value : PickerValue ) => {
7189 console .log (` You selected a ${value .crust .text } pizza with ${value .meat .text } and ${value .veggies .text } ` );
7290 },
7391 },
You can’t perform that action at this time.
0 commit comments