Skip to content

Commit 28795fb

Browse files
docs(v6): update Angular example for buttons
1 parent 5934210 commit 28795fb

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-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 { personCircle, search, ellipsisHorizontal, ellipsisVertical, helpCircle, star, create } 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({ personCircle, search, ellipsisHorizontal, ellipsisVertical, helpCircle, star, create });
21+
}
22+
}
23+
```

static/usage/v6/buttons/types/index.md

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

89
<Playground
910
version="6"
10-
code={{ javascript, react, vue, angular }}
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+
}}
1122
src="usage/v6/buttons/types/demo.html"
1223
size="medium"
1324
/>

0 commit comments

Comments
 (0)