Closed sackIndian closed 11 years ago
If you want to print all the children in a module's template:
{{#children}}
{{{child}}}
{{/children}}
Inside the loop you also have access to the child's model:
{{#children}}
<h2>{{title}}</h2>
{{{child}}}
{{/children}}
Sounds like you need to read the docs more thoroughly :)
Yes @wilsonpage. Thank you very much..
Please let me know if more docs available for Fruitmachine + Hogan.js?
var view = fruitmachine({ module: 'apple', children: [ { slot : 1, module: 'pear', children: { { //here i not defined slot module: 'blackberry', model: model }, { //here i not defined slot module: 'blueberry', model: model } } } ] });
var appleTemp = Hogan.compile('{{{1}}}');
var pearTemp = Hogan.compile('{{{blackberry}}}'); //i am not defined slot:'blackberry' at the child of pear
From pearTemp how can i refer to its childs?