Open Haraldson opened 8 years ago
This definitely sounds like a context problem. Maybe you can do a {{log this}}
in each mode to figure out what the context is?
{{log this}}
returns the correct attributes in all the templates.
The weird thing is that I can use other partials without any problems at all.
{{! The one causing problems – always called from inside a loop, thus the ../ and the this }}
{{>type-subtype-operation type=../type sub_type=../sub_type operation=this}}
{{! This one’s playing along nicely }}
{{>image image=image alt=title}}
Optimized: Partials works nicely, unless they’re invoked from a template that is in turn invoked from
_.map
. Unoptimized: Partials works no matter the context they’re in.Am I supposed to bind my compiled template somehow, and if so, to what context?
Example given below
view.js
accepted-sources-template.hbs