// listen to internal dialog events.
hooks:{
// triggered when the dialog is shown, this is seperate from user defined onshow
onshow: function(){
},
// triggered when the dialog is closed, this is seperate from user defined onclose
onclose: function(){
},
// triggered when a dialog option gets updated.
// IMPORTANT: This will not be triggered for dialog custom settings updates ( use settingUpdated instead).
onupdate: function(){
}
}
onDestroyed : Register a function to be called when an instance of this template is removed from the DOM and destroyed.
If renderTemplate(Template.myTpl) only return HTML, (your renderTemplate = Blaze.toHTML(Template.myTpl)), you can’t run onDestroyed when close the Alertify because onDestroyed have called after Blaze.toHTML return HTML.