我相信新的JS模板和把手 我有一個嵌套的JSON結構,往往每一父節點是一個新的對象/有不同的結構,從而遞歸不是溶液我想。在車把重用模板
我的問題是 是否有可能調用在車把上的模板的另一個模板?
我的背景是XSLT
例子:
<script id="entry-template" type="text/x-handlebars-template">
<div>{{name}}</div>
.. call template-2
</script>
<script id="template-2" type="text/x-handlebars-template">
<div>{{name2}}</div>
.. call template-3
</script>
<script id="template-3" type="text/x-handlebars-template">
<div>{{name3}}</div>
</script>
..等等
任何人誰擁有一些建議嗎?
最好的問候, 鮑勃
下面是從另一用戶的StackOverflow自定義解決方案:http://stackoverflow.com/questions/10537724/handlebars-helper-for-template-composition –