showAlert()
The showAlert()
function displays a temporary toast-style alert message to the user for precisely 5 seconds. The duration of the alert message can't be modified.
Signature
showAlert(message: string, type: string): Promise
Parameters
Message
A string value that contains the text displayed in the alert message.
Type
Enables you to configure the type of the alert message. It accepts the following string values -
info
success
error
warning
Example:
{{showAlert('Data submitted successfully', 'success');}}