<script id="my-template" type ="text/template"> <div>test</div>
Marionette.js模板不能打印完全地
<%=console.log("ENFIN")%> </script>
煥我打電話給我的模板:
var myView = new ProfileView({model: myProfile});
myView.render();
只有控制檯日誌apears而不是測試
任何想法?
非常感謝您
<script id="my-template" type ="text/template"> <div>test</div>
Marionette.js模板不能打印完全地
<%=console.log("ENFIN")%> </script>
煥我打電話給我的模板:
var myView = new ProfileView({model: myProfile});
myView.render();
只有控制檯日誌apears而不是測試
任何想法?
非常感謝您
裹一切與DIV標籤的腳本模板...這將解決您的問題
<script id = "my-template" type = "text/template">
<div>
<div>test</div>
<%=console.log("ENFIN")%>
</div>
</script>
我已經測試過你的答案,但它不會改變任何東西:(謝謝你無論如何 – gregouille
你是從「Marionette ItemView」擴展的嗎?我假設你使用的是基於標題的木偶,如果你使用木偶,你應該使用Marionette Region以顯示您的意見,您不必直接調用渲染。 – addisu
謝謝!我沒有任何區域 – gregouille
可能是我重新前人的精力,使我的觀點裏? – gregouille
試着用你的問題製作一個jsFiddle,這樣用戶就可以看到你正在談論的問題(以及所有的代碼)。 –