Skip to content

Commit

Permalink
fix: add BrowserAnimationsModule
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Klesse committed Jul 8, 2024
1 parent 193ba78 commit 326bde8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { animate, query, style, transition, trigger } from '@angular/animations'
import { Subscription } from 'rxjs';
import { Toast, ToastService, ToastType } from '@lenne.tech/ng-base/shared';
import { NgClass } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

const toastAnimation = trigger('toastAnimation', [
transition('* <=> *', [
query(
':enter',
[style({ transform: 'translateX({{ x }})' }), animate('200ms ease-in', style({ transform: 'translateX(0%)' }))],
{ optional: true }
{ optional: true },
),
query(':leave', animate('200ms ease-in', style({ transform: 'translateX({{ x }})' })), { optional: true }),
]),
Expand All @@ -21,9 +22,7 @@ const toastAnimation = trigger('toastAnimation', [
styleUrls: ['./toast.component.scss'],
animations: [toastAnimation],
standalone: true,
imports: [
NgClass
]
imports: [NgClass, BrowserAnimationsModule],
})
export class ToastComponent implements OnInit, OnDestroy {
toasts: Toast[] = [];
Expand All @@ -39,7 +38,7 @@ export class ToastComponent implements OnInit, OnDestroy {
next: (value) => {
this.toasts = value;
},
})
}),
);
}

Expand Down

0 comments on commit 326bde8

Please sign in to comment.