$modal.open({template:}) code example
Example 1: bootstrap modal
Example 2: bootstrap on hidden bs modal
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})