meteor - Accessing other templates' instances -
you can access current template's instance doing template.instance()
. run situations have access other templates' instances well. example, if use reactivevar
, want or set variables attached other template instances.
i came across how parent template instance (of current template) not complete.
q1. how can access template's instance, not current template's
q2. against meteor way if need access other templates' instances?
you can try set template variable directly @ template level instead of inside instance.
template.example.myvariable = new reactivevar();
instead of
template.example.oncreated(function (){ this.myvariable = new reactivevar(); });
Comments
Post a Comment