Bootstrap modal – disable closing with ESC key or mouse

Must Read : Bootstrap modal – disable closing with ESC key or mouse

With Twitter Bootstrap modals in either version 2 or 3, you can easily prevent the modal window from being closed with the escape key or by clicking on the black backdrop outside the window.

This is useful for keeping people inside of a wizard or other multi-step process inside of a modal box.

Disable the keyboard (ESC key) and mouse clicks outside window

Adding the attributes of data-keyboard="false" and data-backdrop="static" to your modal div will keep the escape key from closing the window.

Add to HTML element

OR control with JavaScript

Modals and Popups Provider For Angular.js Applications – ngDialog

Must Read : Modals and Popups Provider For Angular.js Applications – ngDialog

ngDialog is a module for AngularJS to create highly customizable modal & popup windows on the web page.

Basic Usage:

Load the ngDialog’s basic and theme CSS files in the head section of the page.

Create a button to toggle a modal window.

Load the Angular.js and ngDialog’s script in the page.

Modal Template.

The javascript.

[button style=”btn-link btn-lg” icon=”glyphicon glyphicon-download-alt” align=”left” iconcolor=”#1e73be” type=”link” target=”_blank” title=”Download” link=”https://github.com/likeastore/ngDialog/archive/master.zip” linkrel=””]