Skip to content

Commit 6eaba4c

Browse files
committed
docs(icon): update angular to standalone
1 parent c5926f0 commit 6eaba4c

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

static/usage/v7/icon/basic/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 { IonIcon } from '@ionic/angular/standalone';
34

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

75
@Component({
86
selector: 'app-example',
97
templateUrl: 'example.component.html',
10-
styleUrls: ['example.component.css'],
8+
imports: [IonIcon],
119
})
12-
export class ExampleComponent {
13-
constructor() {
14-
/**
15-
* Any icons you want to use in your application
16-
* can be registered in app.component.ts and then
17-
* referenced by name anywhere in your application.
18-
*/
19-
addIcons({ logoIonic });
20-
}
21-
}
10+
export class ExampleComponent {}
2211
```

static/usage/v8/icon/basic/index.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ import angular_example_component_ts from './angular/example_component_ts.md';
1212
<Playground
1313
version="8"
1414
code={{
15-
javascript: {
16-
files: {
17-
'index.html': javascript_index_html,
18-
'index.ts': javascript_index_ts,
19-
},
20-
},
15+
javascript,
2116
react,
2217
vue,
2318
angular: {

0 commit comments

Comments
 (0)