nzSweetAlert
A super lightweight, "promising" Angular wrapper for SweetAlert, a beautiful replacement for Javascript's "Alert".
Demo
Install
bower install nz-sweet-alert
- Include files in your app
- SweetAlert Javascript & CSS
nzSweetAlert.js
- include
nzSweetAlert
as a dependency (i.e. inapp.js
) - Inject
nzSwal
into a service, controller, etc, to use.
Promises
Use as directed on http://tristanedwards.me/sweetalert, with the exception of callbacks, which now use promises!
Simply put:
;
Tips
Set global SweetAlert defaults (yes, you can do that!) like so:
windowswal;
Happy Alerting!