Angular Bootstrap Modal not to close on click
Angular Bootstrap Modal is one of the best angular component available for angular 5. Though it's simple sometimes possible to miss reading the API documentation properly. Set backdrop to "static" to avoid closing on click.
Example:
Example:
const modalRef = this.modalService.open(ItemModalContentComponent, {size: 'lg', backdrop: 'static'});
Properties
backdrop |
Whether a backdrop element should be created for a given modal (true by default). Alternatively, specify 'static' for a backdrop which doesn't close the modal on click.
|