Skip to content

Commit

Permalink
docs(playgrounds): update angular to standalone (#3981)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandy Carney <6577830+brandyscarney@users.noreply.github.com>
  • Loading branch information
brandyscarney and brandyscarney authored Dec 31, 2024
1 parent 8557af0 commit 63c2778
Show file tree
Hide file tree
Showing 1,845 changed files with 15,621 additions and 2,693 deletions.
4 changes: 3 additions & 1 deletion docs/api/infinite-scroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The Infinite Scroll component calls an action to be performed when the user scro

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.

## Basic Usage

import Basic from '@site/static/usage/v8/infinite-scroll/basic/index.md';

<Basic />
Expand Down Expand Up @@ -118,4 +120,4 @@ interface InfiniteScrollCustomEvent extends CustomEvent {
<CustomProps />

## Slots
<Slots />
<Slots />
2 changes: 1 addition & 1 deletion docs/api/reorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ In order to sort the array upon completion of the reorder, the array should be p

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.

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.
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.

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

Expand Down
1 change: 0 additions & 1 deletion src/components/global/Playground/stackblitz.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ const openAngularEditor = async (code: string, options?: EditorOptions) => {
'src/global.css': defaultFiles[12],
'src/theme/variables.css': defaultFiles[13],
...options?.files,
...options?.dependencies,
};

files[main] = files[main].replace('provideIonicAngular()', `provideIonicAngular({ mode: '${options?.mode}' })`);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
export class ExampleComponent {}
```
11 changes: 9 additions & 2 deletions static/usage/v7/accordion/accessibility/animations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ 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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/accordion/accessibility/animations/demo.html"
/>
File renamed without changes.
12 changes: 12 additions & 0 deletions static/usage/v7/accordion/basic/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 { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
export class ExampleComponent {}
```
11 changes: 9 additions & 2 deletions static/usage/v7/accordion/basic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ 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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/accordion/basic/demo.html"
size="210px"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
export class ExampleComponent {}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
export class ExampleComponent {}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ 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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
size="250px"
src="usage/v7/accordion/customization/expansion-styles/demo.html"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```ts
import { Component } from '@angular/core';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { caretDownCircle } from 'ionicons/icons';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
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({ caretDownCircle });
}
}
```
11 changes: 9 additions & 2 deletions static/usage/v7/accordion/customization/icons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ 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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
size="250px"
src="usage/v7/accordion/customization/icons/demo.html"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonAccordion, IonAccordionGroup, IonItem, IonLabel],
})
export class ExampleComponent {}
```
2 changes: 2 additions & 0 deletions static/usage/v7/accordion/customization/theming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import react_main_css from './react/main_css.md';
import vue from './vue.md';

import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';
import angular_global_css from './angular/global_css.md';

<Playground
Expand All @@ -24,6 +25,7 @@ import angular_global_css from './angular/global_css.md';
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
'src/global.css': angular_global_css,
},
},
Expand Down
41 changes: 0 additions & 41 deletions static/usage/v7/accordion/disable-group/demo.html

This file was deleted.

17 changes: 0 additions & 17 deletions static/usage/v7/accordion/disable-group/index.md

This file was deleted.

22 changes: 0 additions & 22 deletions static/usage/v7/accordion/disable-group/javascript.md

This file was deleted.

35 changes: 0 additions & 35 deletions static/usage/v7/accordion/disable-group/react.md

This file was deleted.

37 changes: 0 additions & 37 deletions static/usage/v7/accordion/disable-group/vue.md

This file was deleted.

Loading

0 comments on commit 63c2778

Please sign in to comment.