Skip to content

Commit f48db54

Browse files
docs(v6): update Angular example for text
1 parent b9b4fd0 commit f48db54

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed
File renamed without changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonicModule } from '@ionic/angular';
4+
import { addIcons } from 'ionicons';
5+
import { warning } from 'ionicons/icons';
6+
7+
@Component({
8+
selector: 'app-example',
9+
templateUrl: 'example.component.html',
10+
imports: [IonicModule],
11+
standalone: true
12+
})
13+
export class ExampleComponent {
14+
constructor() {
15+
/**
16+
* Any icons you want to use in your application
17+
* can be registered in app.component.ts and then
18+
* referenced by name anywhere in your application.
19+
*/
20+
addIcons({ warning });
21+
}
22+
}
23+
```

static/usage/v6/text/basic/index.md

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

8-
<Playground version="6" code={{ javascript, react, vue, angular }} src="usage/v6/text/basic/demo.html" />
9+
<Playground
10+
version="6"
11+
code={{
12+
javascript,
13+
react,
14+
vue,
15+
angular: {
16+
files: {
17+
'src/app/example.component.html': angular_example_component_html,
18+
'src/app/example.component.ts': angular_example_component_ts,
19+
},
20+
},
21+
}}
22+
src="usage/v6/text/basic/demo.html" />

0 commit comments

Comments
 (0)