Bootstrap alerts, SweetAlert, and Toastr — tuned for contrast and header stacking.
Wrap any text and an optional dismiss button in .alert and one of the four contextual classes (e.g., .alert-success) for basic alert messages.
Build on any alert by adding an optional .alert-dismissible and close button.
Use the .alert-link utility class to quickly provide matching colored links within any alert.
Sweet Alert is a beautiful replacement for standard Javascript's "Alert".
| Examples | Action |
|---|---|
| A basic message | |
| A success message! | |
| A warning message, with a function attached to the "Confirm"-button | |
| ... and by passing a parameter, you can execute something else for "Cancel". |
You can easy add sweet alert in your controller by adding code like this:
swal({
title: "Good job!",
text: "You clicked the button!",
type: "success"
});
Notification service.
You can easy add any notification in your scripts by adding code like this:
Command: toastr["success"]("Example message ", "Example title")
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-center",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}