The alert API is used to report alerts to the app, and display them to the user.
Use ToastApi instead. AlertApi will be removed in a future release.
ToastApi provides richer notification features including:
// Before (AlertApi)alertApi.post({ message: 'Saved!', severity: 'success', display: 'transient' });// After (ToastApi)toastApi.post({ title: 'Saved!', status: 'success', timeout: 5000 }); Copy
// Before (AlertApi)alertApi.post({ message: 'Saved!', severity: 'success', display: 'transient' });// After (ToastApi)toastApi.post({ title: 'Saved!', status: 'success', timeout: 5000 });
Observe alerts posted by other parts of the application.
Post an alert for handling by the application.
The alert API is used to report alerts to the app, and display them to the user.
Deprecated
Use ToastApi instead. AlertApi will be removed in a future release.
ToastApi provides richer notification features including:
Example