Helper passing in helpers


How do I use spacebar to pass dynamic helpers in template?
eg. {{> yo name=titleA}} {{> yo name=titleB}} {{> yo name=titleC}}
but then I have to write 3 helpers.
Can I have something like {{>yo name={{title A}} }}
so that I only need to write one help?


You can do this with global helpers and passing parameters into your template like this:

// parent template
{{> yo name='titleA'}}

// and in a client lib, declare a global template helper
   doSomethingByTitle: function () {...}

// yo template
  <div> {{ doSomethingByTitle }} </div>

// please use `<code>` to format single line code or wrap in 
//multiline code


I find my answer but it’s currently in spacebar devel.
Hope they publish soon


Currently, I use this package :, to change dynamic data between parent template vs child template.