條件語句我使用underscorejs的_.template()
功能與backbonejs在一起。當使用underscore.js V1.3.0,我可以用一個if
聲明如下所示:如果Underscore.js
<script type="text/template" id="tpl_listing_list_item">
<% if(<%= address_2 %>){%>, <%= address_2 %><%}%>
</script>
問題:更新到V1.3.3後,我得到的錯誤Uncaught SyntaxError: Unexpected token ILLEGAL
在JavaScript控制檯。此功能已被刪除?卸下if
代碼修正錯誤。如果它被刪除,是否有另一種方式來實現相同的事情?
還沒有收到有關的'print'功能的線索。每天學些新東西! – tkone
@tkone:你學習各種各樣的事情在回答所有的時間引用文檔:) –