Angular 如何在角度项目中使用Swal?
嗯,我有一个角度项目,想在上面使用swal2,但我不知道如何集成它Angular 如何在角度项目中使用Swal?,angular,sweetalert,sweetalert2,Angular,Sweetalert,Sweetalert2,嗯,我有一个角度项目,想在上面使用swal2,但我不知道如何集成它 请提供帮助。您需要使用命令安装它 npm install --save sweetalert 然后在组件中 import swal from 'sweetalert'; 把它当作 swal({ content: component.location.nativeElement }).then(() => { component.destroy(); });
请提供帮助。您需要使用命令安装它
npm install --save sweetalert
然后在组件中
import swal from 'sweetalert';
把它当作
swal({
content: component.location.nativeElement
}).then(() => {
component.destroy();
});