sweetalert2 / ngx-sweetalert2

Declarative, reactive, and template-driven SweetAlert2 integration for Angular
MIT License
652 stars 94 forks source link

How to disable inject styles in head after angular styles link and not before maybe? #171

Closed WuglyakBolgoink closed 4 years ago

WuglyakBolgoink commented 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:

  1. in sharedModule
    
    // 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`
toverux commented 4 years ago

Hi,

You should use SweetAlert2 source directly instead, see https://github.com/sweetalert2/ngx-sweetalert2/issues/118#issuecomment-527596943