new MessagingService()
Service for displaying messages and notifications to the user.
Methods
_showMessage(message, options) → {Promise}
Show a generic message with options.
Parameters:
| Name | Type | Description |
|---|---|---|
message | string | The message to display |
options | Object | Options for the message display |
Returns:
- Type:
- Promise
showError(message, titleopt, optionsopt) → {Promise}
Show an error message.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
message | string | The error message to display | ||
title | string | | <optional> | null | The title of the error message |
options | Object | <optional> | Options for the message display |
Returns:
- Type:
- Promise
showInfo(message, title, optionsopt) → {Promise}
Show an info message.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
message | string | The message to display | ||
title | string | | null | The title of the message (optional) | |
options | Object | <optional> | Options for the message display |
Returns:
- Type:
- Promise
showSuccess(message, titleopt, optionsopt) → {Promise}
Show a success message.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
message | string | The message to display | ||
title | string | | <optional> | null | The title of the message |
options | Object | <optional> | Options for the message display |
Returns:
- Type:
- Promise
showWarning(message, titleopt, optionsopt) → {Promise}
Show a warning message.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
message | string | The warning message to display | ||
title | string | | <optional> | null | The title of the warning message |
options | Object | <optional> | Options for the message display |
Returns:
- Type:
- Promise
subscribe(key, handler)
Subscribe a handler for message display.
Parameters:
| Name | Type | Description |
|---|---|---|
key | string | Unique key for the handler |
handler | function | Function to handle message display |