meteor-template-var
meteor-template-var copied to clipboard
Can't workout how to pass template to get/set
I'm trying to work inter-template get/set but can't seem to pass the template in this form:
TemplateVar.set(Template.someTemplate, "someKey", "someValue");
which traces to:
_getTemplateInstance: function(givenTemplate, key, value){
var template = null;
// try if a template instance was given
if(_.isObject(givenTemplate) && (givenTemplate.hasOwnProperty('_templateInstance') || givenTemplate.hasOwnProperty('view'))) {
The received givenTemplate
(Template.someTemplate
) fails the givenTemplate.hasOwnProperty('_templateInstance')
test and the attempt falls through to treat it as the key.
How are templates supposed to be passed?