Closed WuglyakBolgoink closed 4 years ago
I try to do steps in https://github.com/sweetalert2/ngx-sweetalert2/issues/118
but this doesn't work!
what I did:
// the function must be outside of @NgModule and exported or the AoT compiler complains export function provideSwal() { return import('sweetalert2/dist/sweetalert2.js'); // instead of import('sweetalert2') }
.... imports: [ SweetAlert2Module.forRoot({ provideSwal }) ], exports: [ SweetAlert2Module ]
then in all feature modules import `sharedModule`
Hi,
You should use SweetAlert2 source directly instead, see https://github.com/sweetalert2/ngx-sweetalert2/issues/118#issuecomment-527596943
I try to do steps in https://github.com/sweetalert2/ngx-sweetalert2/issues/118
but this doesn't work!
what I did:
.... imports: [ SweetAlert2Module.forRoot({ provideSwal }) ], exports: [ SweetAlert2Module ]