demo/src/app/components/+modal/demos/service-options/disable-esc-closing/disable-esc-closing.ts
import { Component, TemplateRef } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
@Component({
selector: 'demo-modal-service-disable-esc-closing',
templateUrl: './disable-esc-closing.html'
})
export class DemoModalServiceDisableEscClosingComponent {
modalRef: BsModalRef;
config = {
keyboard: true
};
constructor(private modalService: BsModalService) {}
openModal(template: TemplateRef<any>) {
this.modalRef = this.modalService.show(template, this.config);
}
}