Javascript 将主干响应嵌入Rails中的下划线模板?
我正在为一个rails项目使用backbone.js。我在rails视图中嵌入了一些模板,比如:Javascript 将主干响应嵌入Rails中的下划线模板?,javascript,ruby-on-rails,backbone.js,underscore.js,Javascript,Ruby On Rails,Backbone.js,Underscore.js,我正在为一个rails项目使用backbone.js。我在rails视图中嵌入了一些模板,比如: <script type="text/template" id="this-is-the-id"> ... template goes here ... ... the line below this is where my error's coming from ... <%% _(<%= aNumber %>.times(function
<script type="text/template" id="this-is-the-id">
... template goes here ...
... the line below this is where my error's coming from ...
<%% _(<%= aNumber %>.times(function(){ console.log('hi'); });) %>
</script>
... 模板放在这里。。。
... 下面这行是我的错误的来源。。。
我得到了错误
未捕获的语法错误:意外标记证明我不需要在转义
中包装一个成员,这为我修复了它。您可能希望将其创建为一个答案并接受它,以便它不再显示在未应答列表中。