smartyもundescore.jsも使いたい欲張りさんに
以下のようにtplに書いて
<script id="template" type="text/template">
{if true}
<p>hoge</p>
{/if}
<% if (true) {ldelim} %>
<p>fuga</p>
<% {rdelim} %>
</script>
あとは_.templateを適切に実行すればOK
More than 5 years have passed since last update.
smartyもundescore.jsも使いたい欲張りさんに
以下のようにtplに書いて
<script id="template" type="text/template">
{if true}
<p>hoge</p>
{/if}
<% if (true) {ldelim} %>
<p>fuga</p>
<% {rdelim} %>
</script>
あとは_.templateを適切に実行すればOK
Register as a new user and use Qiita more conveniently