我正在使用backbone.js和underscore.js来构建一个javascript应用程序.从阅读和尝试在下面的模板中运行模板的几个小时,它变得越来越令人沮丧.
我的模板使用undercore.js模板引擎中的构建:
<script id="navigation_template" type="text/template">
<div><%= title %>
<% _.each(children, function(child) { %>
<% render_this_template_recursively(child) %>
<% }); %>
</div>
</script>
Run Code Online (Sandbox Code Playgroud)
我想为每个子元素渲染此模板(render_this_template_recursively(child)).
我怎样才能做到这一点?
谢谢