diff --git a/static/usage/v7/picker/controller/angular/example_component_ts.md b/static/usage/v7/picker/controller/angular/example_component_ts.md index 16f56cd0ca7..35edd60c597 100644 --- a/static/usage/v7/picker/controller/angular/example_component_ts.md +++ b/static/usage/v7/picker/controller/angular/example_component_ts.md @@ -1,10 +1,12 @@ ```ts import { Component } from '@angular/core'; -import { PickerController } from '@ionic/angular'; +import { IonButton, PickerController } from '@ionic/angular/standalone'; @Component({ selector: 'app-example', templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonButton], }) export class ExampleComponent { constructor(private pickerCtrl: PickerController) {} diff --git a/static/usage/v7/picker/inline/isOpen/angular/example_component_ts.md b/static/usage/v7/picker/inline/isOpen/angular/example_component_ts.md index 69a5fb611aa..9bd0236210c 100644 --- a/static/usage/v7/picker/inline/isOpen/angular/example_component_ts.md +++ b/static/usage/v7/picker/inline/isOpen/angular/example_component_ts.md @@ -1,9 +1,19 @@ ```ts import { Component } from '@angular/core'; +import { IonButton, IonPicker } from '@ionic/angular/standalone'; + +interface PickerValue { + languages: { + text: string; + value: string; + }; +} @Component({ selector: 'app-example', templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonButton, IonPicker], }) export class ExampleComponent { isPickerOpen = false; @@ -39,7 +49,7 @@ export class ExampleComponent { }, { text: 'Confirm', - handler: (value) => { + handler: (value: PickerValue) => { console.log(`You selected: ${value.languages.value}`); }, }, diff --git a/static/usage/v7/picker/inline/trigger/angular/example_component_ts.md b/static/usage/v7/picker/inline/trigger/angular/example_component_ts.md index 7a638c60964..3af371232cf 100644 --- a/static/usage/v7/picker/inline/trigger/angular/example_component_ts.md +++ b/static/usage/v7/picker/inline/trigger/angular/example_component_ts.md @@ -1,9 +1,19 @@ ```ts import { Component } from '@angular/core'; +import { IonButton, IonPicker } from '@ionic/angular/standalone'; + +interface PickerValue { + languages: { + text: string; + value: string; + }; +} @Component({ selector: 'app-example', templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonButton, IonPicker], }) export class ExampleComponent { public pickerColumns = [ @@ -37,7 +47,7 @@ export class ExampleComponent { }, { text: 'Confirm', - handler: (value) => { + handler: (value: PickerValue) => { console.log(`You selected: ${value.languages.value}`); }, }, diff --git a/static/usage/v7/picker/multiple-column/angular/example_component_ts.md b/static/usage/v7/picker/multiple-column/angular/example_component_ts.md index 6f252e19dc9..f2e223cceff 100644 --- a/static/usage/v7/picker/multiple-column/angular/example_component_ts.md +++ b/static/usage/v7/picker/multiple-column/angular/example_component_ts.md @@ -1,9 +1,27 @@ ```ts import { Component } from '@angular/core'; +import { IonButton, IonPicker } from '@ionic/angular/standalone'; + +interface PickerValue { + meat: { + text: string; + value: string; + }; + veggies: { + text: string; + value: string; + }; + crust: { + text: string; + value: string; + }; +} @Component({ selector: 'app-example', templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonButton, IonPicker], }) export class ExampleComponent { public pickerColumns = [ @@ -67,7 +85,7 @@ export class ExampleComponent { }, { text: 'Confirm', - handler: (value) => { + handler: (value: PickerValue) => { console.log(`You selected a ${value.crust.text} pizza with ${value.meat.text} and ${value.veggies.text}`); }, }, diff --git a/static/usage/v8/picker/basic/angular.md b/static/usage/v8/picker/basic/angular/example_component_html.md similarity index 100% rename from static/usage/v8/picker/basic/angular.md rename to static/usage/v8/picker/basic/angular/example_component_html.md diff --git a/static/usage/v8/picker/basic/angular/example_component_ts.md b/static/usage/v8/picker/basic/angular/example_component_ts.md new file mode 100644 index 00000000000..a2519198b50 --- /dev/null +++ b/static/usage/v8/picker/basic/angular/example_component_ts.md @@ -0,0 +1,12 @@ +```ts +import { Component } from '@angular/core'; +import { IonPicker, IonPickerColumn, IonPickerColumnOption } from '@ionic/angular/standalone'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonPicker, IonPickerColumn, IonPickerColumnOption], +}) +export class ExampleComponent {} +``` diff --git a/static/usage/v8/picker/basic/index.md b/static/usage/v8/picker/basic/index.md index ded2d4fe4b3..57c99c522c9 100644 --- a/static/usage/v8/picker/basic/index.md +++ b/static/usage/v8/picker/basic/index.md @@ -1,7 +1,9 @@ import Playground from '@site/src/components/global/Playground'; import javascript from './javascript.md'; -import angular from './angular.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; import react from './react.md'; import vue from './vue.md'; @@ -11,7 +13,12 @@ import vue from './vue.md'; javascript, react, vue, - angular, + angular: { + files: { + 'src/app/example.component.html': angular_example_component_html, + 'src/app/example.component.ts': angular_example_component_ts, + }, + }, }} src="usage/v8/picker/basic/demo.html" size="medium" diff --git a/static/usage/v8/picker/modal/angular/example_component_ts.md b/static/usage/v8/picker/modal/angular/example_component_ts.md index 406b87a5af2..72ecb6a854e 100644 --- a/static/usage/v8/picker/modal/angular/example_component_ts.md +++ b/static/usage/v8/picker/modal/angular/example_component_ts.md @@ -1,10 +1,20 @@ ```ts import { Component } from '@angular/core'; +import { + IonButton, + IonButtons, + IonModal, + IonPicker, + IonPickerColumn, + IonPickerColumnOption, + IonToolbar, +} from '@ionic/angular/standalone'; @Component({ selector: 'app-example', templateUrl: './example.component.html', styleUrls: ['./example.component.css'], + imports: [IonButton, IonButtons, IonModal, IonPicker, IonPickerColumn, IonPickerColumnOption, IonToolbar], }) export class ExampleComponent { currentValue = 'javascript'; diff --git a/static/usage/v8/picker/prefix-suffix/angular.md b/static/usage/v8/picker/prefix-suffix/angular/example_component_html.md similarity index 100% rename from static/usage/v8/picker/prefix-suffix/angular.md rename to static/usage/v8/picker/prefix-suffix/angular/example_component_html.md diff --git a/static/usage/v8/picker/prefix-suffix/angular/example_component_ts.md b/static/usage/v8/picker/prefix-suffix/angular/example_component_ts.md new file mode 100644 index 00000000000..a2519198b50 --- /dev/null +++ b/static/usage/v8/picker/prefix-suffix/angular/example_component_ts.md @@ -0,0 +1,12 @@ +```ts +import { Component } from '@angular/core'; +import { IonPicker, IonPickerColumn, IonPickerColumnOption } from '@ionic/angular/standalone'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonPicker, IonPickerColumn, IonPickerColumnOption], +}) +export class ExampleComponent {} +``` diff --git a/static/usage/v8/picker/prefix-suffix/index.md b/static/usage/v8/picker/prefix-suffix/index.md index af398fd03a6..0b50e1e63a1 100644 --- a/static/usage/v8/picker/prefix-suffix/index.md +++ b/static/usage/v8/picker/prefix-suffix/index.md @@ -1,7 +1,9 @@ import Playground from '@site/src/components/global/Playground'; import javascript from './javascript.md'; -import angular from './angular.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; import react from './react.md'; import vue from './vue.md'; @@ -11,7 +13,12 @@ import vue from './vue.md'; javascript, react, vue, - angular, + angular: { + files: { + 'src/app/example.component.html': angular_example_component_html, + 'src/app/example.component.ts': angular_example_component_ts, + }, + }, }} src="usage/v8/picker/prefix-suffix/demo.html" size="medium" diff --git a/static/usage/v8/picker/theming/css-properties/angular/example_component_ts.md b/static/usage/v8/picker/theming/css-properties/angular/example_component_ts.md new file mode 100644 index 00000000000..a2519198b50 --- /dev/null +++ b/static/usage/v8/picker/theming/css-properties/angular/example_component_ts.md @@ -0,0 +1,12 @@ +```ts +import { Component } from '@angular/core'; +import { IonPicker, IonPickerColumn, IonPickerColumnOption } from '@ionic/angular/standalone'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [IonPicker, IonPickerColumn, IonPickerColumnOption], +}) +export class ExampleComponent {} +``` diff --git a/static/usage/v8/picker/theming/css-properties/index.md b/static/usage/v8/picker/theming/css-properties/index.md index 29f6db3c1c9..1c5abe28947 100644 --- a/static/usage/v8/picker/theming/css-properties/index.md +++ b/static/usage/v8/picker/theming/css-properties/index.md @@ -4,6 +4,7 @@ import javascript from './javascript.md'; import angular_example_component_html from './angular/example_component_html.md'; import angular_example_component_css from './angular/example_component_css.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; import vue from './vue.md'; @@ -25,6 +26,7 @@ import react_main_css from './react/main_css.md'; files: { 'src/app/example.component.html': angular_example_component_html, 'src/app/example.component.css': angular_example_component_css, + 'src/app/example.component.ts': angular_example_component_ts, }, }, }}