I am trying to render a basic backbone view with an underscore template, but I keep getting the following error when attempting to render the template.
Uncaught ReferenceError: amount is not defined
here's the jsfiddle: http://jsfiddle.net/rkj6j36n/
HTML
<body>
<div class="msg-con"></div>
</body>
JS
DumbViewObj = Backbone.View.extend({
el: $('.msg-con'),
initialize:function(){
this.render();
},
render: function(){
var template = _.template('I am <%= amount %> dumb',{amount:'200'});
this.$el.append(template);
},
});
var dumb = new DumbViewObj();
I'm sure the solution is something dead simple, but I can't figure it out