Skip to content

Commit ad0b684

Browse files
committed
docs(picker-legacy): update angular to standalone
1 parent 55a1b31 commit ad0b684

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

static/usage/v8/picker-legacy/controller/angular/example_component_ts.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
```ts
22
import { 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',

static/usage/v8/picker-legacy/inline/isOpen/angular/example_component_ts.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
import { Component } from '@angular/core';
33
import { 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
},

static/usage/v8/picker-legacy/inline/trigger/angular/example_component_ts.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
import { Component } from '@angular/core';
33
import { 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
},

static/usage/v8/picker-legacy/multiple-column/angular/example_component_ts.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
import { Component } from '@angular/core';
33
import { 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
},

0 commit comments

Comments
 (0)