Sweetalert is one of those programs that provides popup messages. A replacement for javascreipt popup boxes like alert().
There’s actually a few products
- SweetAlert2 - this is the original JavaScript component.
- Ngx-sweetalert2 – this is a program that adds additional capability to sweetalert for use in an angular environment.
The additional capabilities of ngx-sweetalert include:
- It includes a [swal] attribute which when added to a button, will cause a warning popup to occur when clicked.
- There’s also a swal component.
You still need the sweetalert2 product, in fact you need to keep the versions in sync.
References
- https://sweetalert2.github.io/ - SweetAlert download page.
- https://github.com/sweetalert2/ngx-sweetalert2 - Ngx-SweetAlert home page.
- https://www.positronx.io/angular-popup-notification-with-sweetalert2-example/ - goes through setting up a page. But doesn’t talk about the formatting.