Angular 13 SweetAlert2 Example to Display Popup Alert Messages in Browser Using sweetalert2 Library in TypeScript

 

 

 

 

 

 

 

ng new angularalert

 

 

cd angularalert

 

 

npm i sweetalert2

 

 

Now go to angular.json file and copy paste the below lines inside the styles array

 

 

 

 

Now go to app.component.html file and copy paste the below code

 

 

 

 

Now go to app.component.ts file and copy paste the below code

 

 

Leave a Reply