Skip to content

Commit

Permalink
docs(select): update angular to standalone (#3963)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney authored Dec 30, 2024
1 parent 6512fcc commit 5c0f307
Show file tree
Hide file tree
Showing 97 changed files with 858 additions and 158 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/basic/multiple-selection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="300px"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/basic/multiple-selection/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {
handleChange(e) {
console.log('ionChange fired with value: ' + e.detail.value);
handleChange(event: CustomEvent) {
console.log('ionChange fired with value: ' + event.detail.value);
}

handleCancel() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/basic/single-selection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="300px"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/basic/single-selection/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/customization/button-text/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="350px"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/customization/button-text/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { add, remove } from 'ionicons/icons';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {
constructor() {
/**
* Any icons you want to use in your application
* can be registered in app.component.ts and then
* referenced by name anywhere in your application.
*/
addIcons({ add, remove });
}
}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/customization/custom-toggle-icons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="400px"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/customization/custom-toggle-icons/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { caretDownSharp } from 'ionicons/icons';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
export class ExampleComponent {
constructor() {
/**
* Any icons you want to use in your application
* can be registered in app.component.ts and then
* referenced by name anywhere in your application.
*/
addIcons({ caretDownSharp });
}
}
```
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {
customAlertOptions = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
File renamed without changes.
12 changes: 12 additions & 0 deletions static/usage/v7/select/fill/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/fill/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/fill/demo.html"
size="300px"
mode="md"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/interfaces/action-sheet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="medium"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/interfaces/action-sheet/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonList, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/interfaces/popover/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
size="400px"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/interfaces/popover/demo.html"
/>
File renamed without changes.
12 changes: 12 additions & 0 deletions static/usage/v7/select/justify/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonItem, IonSelect, IonSelectOption } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonItem, IonSelect, IonSelectOption],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/select/justify/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.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';

<Playground
version="7"
code={{ javascript, react, vue, angular }}
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/select/justify/demo.html"
size="300px"
/>
Loading

0 comments on commit 5c0f307

Please sign in to comment.