Skip to content

Commit cc07b22

Browse files
committed
docs(toast): update angular to standalone
1 parent ce86613 commit cc07b22

File tree

12 files changed

+30
-138
lines changed

12 files changed

+30
-138
lines changed

static/usage/v7/toast/buttons/angular/example_component_ts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export class ExampleComponent {
2626
},
2727
];
2828

29-
setRoleMessage(ev) {
30-
const { role } = ev.detail;
29+
setRoleMessage(event: CustomEvent) {
30+
const { role } = event.detail;
3131
console.log(`Dismissed with role: ${role}`);
3232
}
3333
}

static/usage/v7/toast/icon/angular.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

static/usage/v7/toast/icon/angular/example_component_ts.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
import { Component } from '@angular/core';
33
import { IonButton, IonToast } from '@ionic/angular/standalone';
44

5+
import { addIcons } from 'ionicons';
6+
import { globe } from 'ionicons/icons';
7+
58
@Component({
69
selector: 'app-example',
710
templateUrl: 'example.component.html',
811
styleUrls: ['example.component.css'],
912
imports: [IonButton, IonToast],
1013
})
11-
export class ExampleComponent {}
14+
export class ExampleComponent {
15+
constructor() {
16+
/**
17+
* Any icons you want to use in your application
18+
* can be registered in app.component.ts and then
19+
* referenced by name anywhere in your application.
20+
*/
21+
addIcons({ globe });
22+
}
23+
}
1224
```

static/usage/v7/toast/inline/basic/angular.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

static/usage/v7/toast/position-anchor/angular.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

static/usage/v7/toast/swipe-gesture/angular.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

static/usage/v8/toast/buttons/angular/example_component_ts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export class ExampleComponent {
2626
},
2727
];
2828

29-
setRoleMessage(ev) {
30-
const { role } = ev.detail;
29+
setRoleMessage(event: CustomEvent) {
30+
const { role } = event.detail;
3131
console.log(`Dismissed with role: ${role}`);
3232
}
3333
}

static/usage/v8/toast/icon/angular.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

static/usage/v8/toast/icon/angular/example_component_ts.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
import { Component } from '@angular/core';
33
import { IonButton, IonToast } from '@ionic/angular/standalone';
44

5+
import { addIcons } from 'ionicons';
6+
import { globe } from 'ionicons/icons';
7+
58
@Component({
69
selector: 'app-example',
710
templateUrl: 'example.component.html',
811
styleUrls: ['example.component.css'],
912
imports: [IonButton, IonToast],
1013
})
11-
export class ExampleComponent {}
14+
export class ExampleComponent {
15+
constructor() {
16+
/**
17+
* Any icons you want to use in your application
18+
* can be registered in app.component.ts and then
19+
* referenced by name anywhere in your application.
20+
*/
21+
addIcons({ globe });
22+
}
23+
}
1224
```

static/usage/v8/toast/inline/basic/angular.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)