Skip to content

Commit 4fb2cd1

Browse files
docs(item): update angular to standalone (#3936)
1 parent 11b41f5 commit 4fb2cd1

File tree

68 files changed

+690
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+690
-40
lines changed
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonItem, IonLabel } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
styleUrls: ['example.component.css'],
9+
imports: [IonItem, IonLabel],
10+
})
11+
export class ExampleComponent {}
12+
```

static/usage/v7/item/basic/index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ import Playground from '@site/src/components/global/Playground';
33
import javascript from './javascript.md';
44
import react from './react.md';
55
import vue from './vue.md';
6-
import angular from './angular.md';
76

8-
<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/item/basic/demo.html" size="medium" />
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
9+
10+
<Playground
11+
version="7"
12+
code={{
13+
javascript,
14+
react,
15+
vue,
16+
angular: {
17+
files: {
18+
'src/app/example.component.html': angular_example_component_html,
19+
'src/app/example.component.ts': angular_example_component_ts,
20+
},
21+
},
22+
}}
23+
src="usage/v7/item/basic/demo.html"
24+
size="medium"
25+
/>

static/usage/v7/item/buttons/angular/example_component_ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import { IonButton, IonIcon, IonItem, IonLabel } from '@ionic/angular/standalone';
34

45
import { addIcons } from 'ionicons';
56
import { home, navigate, star } from 'ionicons/icons';
@@ -8,6 +9,7 @@ import { home, navigate, star } from 'ionicons/icons';
89
selector: 'app-example',
910
templateUrl: 'example.component.html',
1011
styleUrls: ['example.component.css'],
12+
imports: [IonButton, IonIcon, IonItem, IonLabel],
1113
})
1214
export class ExampleComponent {
1315
constructor() {
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonItem, IonLabel } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
styleUrls: ['example.component.css'],
9+
imports: [IonItem, IonLabel],
10+
})
11+
export class ExampleComponent {}
12+
```

static/usage/v7/item/clickable/index.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ import Playground from '@site/src/components/global/Playground';
33
import javascript from './javascript.md';
44
import react from './react.md';
55
import vue from './vue.md';
6-
import angular from './angular.md';
76

8-
<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/item/clickable/demo.html" />
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
9+
10+
<Playground
11+
version="7"
12+
code={{
13+
javascript,
14+
react,
15+
vue,
16+
angular: {
17+
files: {
18+
'src/app/example.component.html': angular_example_component_html,
19+
'src/app/example.component.ts': angular_example_component_ts,
20+
},
21+
},
22+
}}
23+
src="usage/v7/item/clickable/demo.html"
24+
/>

static/usage/v7/item/content-types/actions/angular/example_component_ts.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import {
4+
IonAvatar,
5+
IonContent,
6+
IonHeader,
7+
IonIcon,
8+
IonItem,
9+
IonItemOption,
10+
IonItemOptions,
11+
IonItemSliding,
12+
IonLabel,
13+
IonList,
14+
IonTitle,
15+
IonToolbar,
16+
} from '@ionic/angular/standalone';
317

418
import { addIcons } from 'ionicons';
519
import { pin, share, trash } from 'ionicons/icons';
@@ -8,6 +22,20 @@ import { pin, share, trash } from 'ionicons/icons';
822
selector: 'app-example',
923
templateUrl: 'example.component.html',
1024
styleUrls: ['example.component.css'],
25+
imports: [
26+
IonAvatar,
27+
IonContent,
28+
IonHeader,
29+
IonIcon,
30+
IonItem,
31+
IonItemOption,
32+
IonItemOptions,
33+
IonItemSliding,
34+
IonLabel,
35+
IonList,
36+
IonTitle,
37+
IonToolbar,
38+
],
1139
})
1240
export class ExampleComponent {
1341
constructor() {
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import {
4+
IonCheckbox,
5+
IonContent,
6+
IonHeader,
7+
IonInput,
8+
IonItem,
9+
IonList,
10+
IonTitle,
11+
IonToolbar,
12+
} from '@ionic/angular/standalone';
13+
14+
@Component({
15+
selector: 'app-example',
16+
templateUrl: 'example.component.html',
17+
styleUrls: ['example.component.css'],
18+
imports: [IonCheckbox, IonContent, IonHeader, IonInput, IonItem, IonList, IonTitle, IonToolbar],
19+
})
20+
export class ExampleComponent {}
21+
```

0 commit comments

Comments
 (0)