If I find "_.template ($ ('# pranks-list'). Html ())" on the Chrome JS console, it also works
>> _.template($('#pranks-list').html())
function (a){return e.call(this,a,b)}
app.js // Views
window.PranksListView = Backbone.View.extend({
template: _.template($('#pranks-list').html())
});
Index.html
<script type="text/html" id="pranks-list">
<li><a href='#pranks/<%= id %>'><%= name %></a></li>
</script>
</body>
Why am I getting this error on this line?
template: _.template($('#pranks-list').html())
source
share