Search documentation

Type to search the documentation.

API: Primitives

ToastService

Service reference for ToastService.

Overview

Properties

Name Type Description
readonly toasts Signal<Toast[]>
readonly toastsByPosition Signal<Map<ToastPosition, Toast[]>>

Public methods

show

show(options: ToastOptions): string
Parameter Type Optional Description
options ToastOptions

success

success(message: string, title?: string, options?: Omit<ToastOptions, "type" | "message" | "title">): string
Parameter Type Optional Description
message string
title string Yes
options Omit<ToastOptions, 'type' | 'message' | 'title'> Yes

error

error(message: string, title?: string, options?: Omit<ToastOptions, "type" | "message" | "title">): string
Parameter Type Optional Description
message string
title string Yes
options Omit<ToastOptions, 'type' | 'message' | 'title'> Yes

warning

warning(message: string, title?: string, options?: Omit<ToastOptions, "type" | "message" | "title">): string
Parameter Type Optional Description
message string
title string Yes
options Omit<ToastOptions, 'type' | 'message' | 'title'> Yes

info

info(message: string, title?: string, options?: Omit<ToastOptions, "type" | "message" | "title">): string
Parameter Type Optional Description
message string
title string Yes
options Omit<ToastOptions, 'type' | 'message' | 'title'> Yes

dismiss

dismiss(id: string): void
Parameter Type Optional Description
id string

dismissAll

dismissAll(): void

pause

pause(id: string): void
Parameter Type Optional Description
id string

resume

resume(id: string): void
Parameter Type Optional Description
id string