Skip to content

Commit c71c55c

Browse files
docs(card): update angular to standalone (#3920)
1 parent 223a1fc commit c71c55c

32 files changed

+346
-16
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 { IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
styleUrls: ['example.component.css'],
9+
imports: [IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle],
10+
})
11+
export class ExampleComponent {}
12+
```

static/usage/v7/card/basic/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/card/basic/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/card/basic/demo.html"
24+
/>
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import {
4+
IonButton,
5+
IonCard,
6+
IonCardContent,
7+
IonCardHeader,
8+
IonCardSubtitle,
9+
IonCardTitle,
10+
} from '@ionic/angular/standalone';
11+
12+
@Component({
13+
selector: 'app-example',
14+
templateUrl: 'example.component.html',
15+
styleUrls: ['example.component.css'],
16+
imports: [IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle],
17+
})
18+
export class ExampleComponent {}
19+
```

static/usage/v7/card/buttons/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/card/buttons/demo.html" size="300px" />
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/card/buttons/demo.html"
24+
size="300px"
25+
/>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import {
4+
IonCard,
5+
IonCardContent,
6+
IonCardHeader,
7+
IonCardSubtitle,
8+
IonCardTitle,
9+
IonItem,
10+
IonLabel,
11+
IonList,
12+
IonThumbnail,
13+
} from '@ionic/angular/standalone';
14+
15+
@Component({
16+
selector: 'app-example',
17+
templateUrl: 'example.component.html',
18+
styleUrls: ['example.component.css'],
19+
imports: [
20+
IonCard,
21+
IonCardContent,
22+
IonCardHeader,
23+
IonCardSubtitle,
24+
IonCardTitle,
25+
IonItem,
26+
IonLabel,
27+
IonList,
28+
IonThumbnail,
29+
],
30+
})
31+
export class ExampleComponent {}
32+
```

static/usage/v7/card/list/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import vue from './vue.md';
99

1010
import angular_example_component_html from './angular/example_component_html.md';
1111
import angular_example_component_css from './angular/example_component_css.md';
12+
import angular_example_component_ts from './angular/example_component_ts.md';
1213

1314
<Playground
1415
version="7"
@@ -25,6 +26,7 @@ import angular_example_component_css from './angular/example_component_css.md';
2526
files: {
2627
'src/app/example.component.html': angular_example_component_html,
2728
'src/app/example.component.css': angular_example_component_css,
29+
'src/app/example.component.ts': angular_example_component_ts,
2830
},
2931
},
3032
}}
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 { IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
styleUrls: ['example.component.css'],
9+
imports: [IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle],
10+
})
11+
export class ExampleComponent {}
12+
```

0 commit comments

Comments
 (0)