In this article, We learn how to apply and implement SweetAlert2 in Angular. I will show how to do it, and just follow the steps clearly.
For more updates please do Subscribe via Email:
SweetAlert2
Sweet Alert is a method or way to customize alert notification in your application, website, or games. It is more presentable and UI friendly and fit for the new trend design. you can customize the text, color, button, and also the icon.
Installation to angular
To install the SweetAlert2 packages just run this code in your terminal.
npm i sweetalert2
To understand what is npm mean just refer this LINK . And i tag is shorten for install.
Implementation
Import this into your type-script file.
import Swal from 'sweetalert2';
Simple Sweet Alert working and this is appeared in the center of your screen.
Swal.fire(
'Good job!',
'You clicked the button!',
'success'
)
GitHub Link: https://github.com/JaveTLupango/AngularCRUD/tree/SweetAlertAngular/src/app/sweet-alert
for more guide about customize alert. please refer this link : https://sweetalert2.github.io/
Related Topics
How to upload image in Angular
In this article, I will show how to Image upload in Angular. I will show how to do it, and just follow the steps clearly. […]
How to call child component method from parent in Angular
In this article, We learn how to call child component method from parent in Angular. I will show how to do it, and just follow […]
How to passing data from mother component to child component in angular.
In this article, we learn how to pass variable from one component to another component. I will show you how, just follow the steps clearly. […]
Implement copy to clipboard in angular using ngx-copypaste
In this article, We learn how to implement the ngx-copypaste in angular for copy to clipboard feature. I will show you how to do it, […]
How to set homepage route URL in angular routing?
In this article, we learn how to setting up homepage route URL in angular routings. I will show you how, just follow the steps clearly. […]
This piece of writing will assist the internet visitors for setting up new webpage or even a blog from start
to end.