Skip to content

Commit 63c2778

Browse files
docs(playgrounds): update angular to standalone (#3981)
Co-authored-by: Brandy Carney <[email protected]>
1 parent 8557af0 commit 63c2778

File tree

1,845 files changed

+15621
-2693
lines changed

Some content is hidden

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

1,845 files changed

+15621
-2693
lines changed

docs/api/infinite-scroll.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The Infinite Scroll component calls an action to be performed when the user scro
2121

2222
The expression assigned to the `ionInfinite` event is called when the user reaches that defined distance. When this expression has finished any and all tasks, it should call the `complete()` method on the infinite scroll instance.
2323

24+
## Basic Usage
25+
2426
import Basic from '@site/static/usage/v8/infinite-scroll/basic/index.md';
2527

2628
<Basic />
@@ -118,4 +120,4 @@ interface InfiniteScrollCustomEvent extends CustomEvent {
118120
<CustomProps />
119121

120122
## Slots
121-
<Slots />
123+
<Slots />

docs/api/reorder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ In order to sort the array upon completion of the reorder, the array should be p
6767

6868
In some cases, it may be necessary for an app to reorder both the array and the DOM nodes on its own. If this is required, `false` should be passed as a parameter to the `complete` method. This will prevent Ionic from reordering any DOM nodes inside of the reorder group.
6969

70-
Regardless of the approach taken, a stable identity should be provided to reorder items if provided in a loop. This means using `trackBy` for Angular, and `key` for React and Vue.
70+
Regardless of the approach taken, a stable identity should be provided to reorder items if provided in a loop. This means using `track` for Angular, and `key` for React and Vue.
7171

7272
import UpdatingData from '@site/static/usage/v8/reorder/updating-data/index.md';
7373

src/components/global/Playground/stackblitz.utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ const openAngularEditor = async (code: string, options?: EditorOptions) => {
153153
'src/global.css': defaultFiles[12],
154154
'src/theme/variables.css': defaultFiles[13],
155155
...options?.files,
156-
...options?.dependencies,
157156
};
158157

159158
files[main] = files[main].replace('provideIonicAngular()', `provideIonicAngular({ mode: '${options?.mode}' })`);
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 { IonAccordion, IonAccordionGroup, 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: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
10+
})
11+
export class ExampleComponent {}
12+
```

static/usage/v7/accordion/accessibility/animations/index.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +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';
6+
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
79

810
<Playground
911
version="7"
1012
code={{
1113
javascript,
1214
react,
1315
vue,
14-
angular,
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+
},
1522
}}
1623
src="usage/v7/accordion/accessibility/animations/demo.html"
1724
/>
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 { IonAccordion, IonAccordionGroup, 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: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
10+
})
11+
export class ExampleComponent {}
12+
```

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +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';
6+
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
79

810
<Playground
911
version="7"
1012
code={{
1113
javascript,
1214
react,
1315
vue,
14-
angular,
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+
},
1522
}}
1623
src="usage/v7/accordion/basic/demo.html"
1724
size="210px"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';
34

45
@Component({
56
selector: 'app-example',
67
templateUrl: 'example.component.html',
78
styleUrls: ['example.component.css'],
9+
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
810
})
911
export class ExampleComponent {}
1012
```

0 commit comments

Comments
 (0)