{"repo":"dwmkerr/angular-modal-service","free":true,"listed":false,"github":"https://github.com/dwmkerr/angular-modal-service","clone":"git clone https://github.com/dwmkerr/angular-modal-service.git","description":"Modal service for AngularJS - supports creating popups and modals via a service.","language":"JavaScript","stars":618,"topics":["angular","javascript"],"license":"MIT","category":"ui-components","readme_excerpt":"angular-modal-service Modal service for AngularJS - supports creating popups and modals via a service. Full support for Angular 1.5+ components. See a quick fiddle or a full set of samples at dwmkerr.github.io/angular-modal-service. Usage Support for AngularJS 1.5.x Components ShowModal Options The Modal Object The Modal Controller Closing All Modals Animation Error Handing Global Options Configuration Developing Tests Releasing FAQ Thanks Usage Install with Bower (or NPM): Then reference the minified script: Specify the modal service as a dependency of your application: Now just inject the modal service into any controller, service or directive where you need it. Calling showModal returns a promise which is resolved when the modal DOM element is created and the controller for it is created. The promise returns a modal object which contains the element created, the controller, the scope and two promises: close and closed . Both are resolved to the result of the modal close function, but close is resolved as soon as the modal close function is called, while closed is only resolved once the modal has finished animating and has been completely removed from the DOM. The modal controller can be any controller that you like, just remember that it is always provided with one extra parameter - the close function. Here's an example controller for a bootstrap modal: The close function is automatically injected to the modal controller and takes the result object (which is passed to the ","default_branch":null,"files":null,"tree":[],"storefront":"/r/dwmkerr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dwmkerr/angular-modal-service/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}