Skip to content

v0.12.0

Compare
Choose a tag to compare
@dwmkerr dwmkerr released this 20 May 12:29
· 134 commits to master since this release

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
});