ngx-bootstrap modal: How to get a return value from a modal?

Try like this : myexample it’s working correctly. hope this will help you home.module.ts import { ModalModule } from ‘ngx-bootstrap’; @NgModule({ imports: [ ModalModule.forRoot() ] }) home.component.html <button class=”btn btn-primary” (click)=”openConfirmDialog()”>Open Confirm box </button> home.component.ts import { BsModalService } from ‘ngx-bootstrap/modal’; import { BsModalRef } from ‘ngx-bootstrap/modal/modal-options.class’; export class HomeComponent { public modalRef: BsModalRef; constructor( … Read more