1.0.0 • Published 5 years ago

@sammaye/ngx-bootstrap-confirm-modal v1.0.0

Weekly downloads
1
License
-
Repository
-
Last release
5 years ago

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.