How to use the @sweetalert2/ngx-sweetalert2.SweetAlert2Module.forChild function in @sweetalert2/ngx-sweetalert2

To help you get started, we’ve selected a few @sweetalert2/ngx-sweetalert2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sweetalert2 / ngx-sweetalert2 / projects / ngx-sweetalert2-demo / src / app / nested / nested.module.ts View on Github external
import { NgModule } from '@angular/core';
import { SweetAlert2Module } from '@sweetalert2/ngx-sweetalert2';
import { NestedRoutingModule } from './nested-routing.module';
import { NestedComponent } from './nested.component';

export function provideSwal() {
    return import('sweetalert2').then(({ default: swal }) => swal.mixin({
        backdrop: false
    }));
}

@NgModule({
    imports: [
        SweetAlert2Module.forChild({ provideSwal }),
        NestedRoutingModule
    ],
    declarations: [
        NestedComponent
    ]
})
export class NestedModule {
}

@sweetalert2/ngx-sweetalert2

MIT
Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis

Similar packages