Skip to content

Instantly share code, notes, and snippets.

@cannap
Created July 8, 2015 10:54
Show Gist options
  • Save cannap/48380c80fcc6181e4eb9 to your computer and use it in GitHub Desktop.
Save cannap/48380c80fcc6181e4eb9 to your computer and use it in GitHub Desktop.
Template.fehler.events({
'click .show-tool': function () {
if (Fehler.viewCache) {
Blaze.remove(Fehler.viewCache);
Fehler.viewCache = false;
}
// Fehler.viewCache = Blaze.render(Template[this.templateName], document.body);
Fehler.viewCache = Fehler.renderView(this.templateName,{title: 'HI'});
},
});
Fehler.renderView = function (template,data) {
return Blaze.renderWithData(
Template.toolFrame,
{
contentTemplate: template,
contentData: data
},
document.body);
};
<template name="toolFrame">
<div class="modal">
{{> Template.dynamic template=contentTemplate data=contentData}}
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment