v0.12.0
This release adds two much needed APIs:
closeModals
ModalService.closeModals(result, delay)
: Closes any open modals, passing the specified result (optional) and waiting for the specified delay (optional).
preClose
ModalService.showModal(options)
: A new optional field named preClose
is a function which is called before the modal starts closing. If you want to clean up your Bootstrap modals automatically, just use:
ModalService.showModal({
templateUrl: "some/bootstrap-template.html",
controller: "SomeController",
preClose: (modal) => { modal.element.modal('hide'); }
}).then(function(modal) {
// etc
});