Created
July 8, 2015 10:54
-
-
Save cannap/48380c80fcc6181e4eb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'}); | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fehler.renderView = function (template,data) { | |
return Blaze.renderWithData( | |
Template.toolFrame, | |
{ | |
contentTemplate: template, | |
contentData: data | |
}, | |
document.body); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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