CngxToaster
projects/ui/feedback/toast/toast.service.ts
Import#
import { CngxToaster } from '@cngx/ui/feedback'
Description#
Feature-scoped toast service - not providedIn: 'root'.
Provide via provideFeedback(withToasts()) or provideToasts() at the
app-shell or route level.
Manages the toast stack as a signal array. CngxToastOutlet reads it reactively.
Index#
Properties
Methods
Instance Properties#
Dedup window in ms - identical toasts within this window are merged.
signal<number>(this.config?.toastDedupWindow ?? 1000)Default duration for non-error toasts.
signal<number>(this.config?.toastDefaultDuration ?? 5000)readonly ToastState[]Reactive toast stack - read by CngxToastOutlet.
signal<readonly ToastState[]>([])