Juicer模板代码:<script id="tpl" type="text/template"> <ul> {@each list as it,index} <li>${it.name} (index: ${index})</li> {@/each} {@each blah as it} <li> num: ${it.num} <br /> {@if it.num==3} {@each it.inner as it2} ${it2.time} <br /> {@/each} {@/if} </li> {@/each} </ul></script>以前用 jQuery Templates 的时候,模板内很容易写JavaScript代码,用Juicer改怎么办?例如:在模板内应用JSON.stringify();
添加回答
举报
0/150
提交
取消