Skip to content

Commit 5fe1f91

Browse files
committed
fix(toasters): toast.index is a signal
1 parent 7f6bfe4 commit 5fe1f91

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component } from '@angular/core';
22

33
@Component({
44
selector: 'toast-sample-icon',
55
templateUrl: './toast-sample-icon.component.svg',
6+
standalone: true
67
})
7-
export class ToastSampleIconComponent implements OnInit {
8-
9-
constructor() { }
10-
11-
ngOnInit(): void {
12-
}
13-
8+
export class ToastSampleIconComponent {
149
}

Diff for: src/app/views/notifications/toasters/toast-simple/toast.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<strong>{{ title }}</strong>
88
</c-toast-header>
99
<c-toast-body #toastBody [cToastClose]="toastBody.toast">
10-
<p class="mb-1">This is a dynamic toast no {{ toastBody.toast?.index }} {{ toastBody.toast?.clock }}</p>
10+
<p class="mb-1">This is a dynamic toast no {{ toastBody.toast?.index() }} {{ toastBody.toast?.clock }}</p>
1111
<ng-content />
1212
<c-progress thin [value]="25*(toastBody.toast?.clock ?? 1)" />
1313
</c-toast-body>

Diff for: src/app/views/notifications/toasters/toasters.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h5>Add toast with following props:</h5>
7575
</c-toast>
7676
<app-toast-simple #toast [autohide]="false" [fade]="true" [visible]="true" [title]="'App Toast'"
7777
color="secondary">
78-
This is a toast in static positioned App toaster! {{ toast.index }}
78+
This is a toast in static positioned App toaster! {{ toast.index() }}
7979
</app-toast-simple>
8080
</c-toaster>
8181
</c-col>

0 commit comments

Comments
 (0)