MessagingService
Source: MessagingService.ts:8
Service for displaying messages and notifications to the user.
Constructor
new MessagingService(): MessagingServiceInstance Methods
subscribe(key: string, handler: function)
Subscribe a handler for message display.
Parameters
key(string) — Unique key for the handlerhandler(function) — Function to handle message display
_showMessage(message: string, options: Object): Promise
Show a generic message with options.
Parameters
message(string) — The message to displayoptions(Object) — Options for the message display
Returns
Promise
showInfo(
message: string,
title: string | null,
options?: Object,
): Promise
Show an info message.
Parameters
message(string) — The message to displaytitle(string | null, default: null) — The title of the message (optional)options(Object, optional) — Options for the message display
Returns
Promise
showSuccess(
message: string,
title?: string | null,
options?: Object,
): Promise
Show a success message.
Parameters
message(string) — The message to displaytitle(string | null, optional, default: null) — The title of the messageoptions(Object, optional) — Options for the message display
Returns
Promise
showError(
message: string,
title?: string | null,
options?: Object,
): Promise
Show an error message.
Parameters
message(string) — The error message to displaytitle(string | null, optional, default: null) — The title of the error messageoptions(Object, optional) — Options for the message display
Returns
Promise
showWarning(
message: string,
title?: string | null,
options?: Object,
): Promise
Show a warning message.
Parameters
message(string) — The warning message to displaytitle(string | null, optional, default: null) — The title of the warning messageoptions(Object, optional) — Options for the message display
Returns
Promise