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:
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.
Type: boolean | "static"




Popular posts from this blog

Generating unique string in C#

Internet Information Services (IIS) on Load Balancer and shared folder for files

SQL Query Optimization