@sammaye/ngx-bootstrap-confirm-modal
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ngx-bootstrap-confirm-modal

A really simple but so very helpful confirm modal for Ngx Bootstrap.

Install

npm i @sammaye/ngx-bootstrap-confirm-modal --save

Use

In module:

@NgModule({
  imports: [
    ModalModule.forRoot(),
    NgxBootstrapConfirmModalModule,
  ],
})
export class MyModule {
}

In Component:

componentFunction() {
    this.modalService.show(NgxBootstrapConfirmModal, {
      ignoreBackdropClick: true, initialState: {
        message: `Do you luuuuuv me?`
      }
    }).content.result.subscribe(response => {
      if (response) {
        // yes I do
      }
    });
}

As simple as that, it works exactly as how the Ngx Bootstrap documentation says modals should work. All this library does is give you the code to produce a confirmation modal for free.

Package Sidebar

Install

npm i @sammaye/ngx-bootstrap-confirm-modal

Weekly Downloads

0

Version

1.0.0

License

none

Unpacked Size

41.5 kB

Total Files

23

Last publish

Collaborators

  • sammaye