uncaught TypeError: Não é possível chamar o método 'replace' de backbone.js indefinido
Eu estou tentando desenvolver um aplicativo RSS simples usando backbone.js. Eu estou usando este backbone.jstutorial. Estou recebendo o seguinte erro, na linha 2 (modelo), ao definir o modelo. Alguém também pode me dizer por que é tagName: "li" definido no tutorial?
uncaught TypeError: Não é possível chamar o método 'replace' de backbone.js indefinido
Javscript
window.SourceListView = Backbone.View.extend({
tagName:"li",
template: _.template($('#tmpl_sourcelist').html()),
initialize:function () {
this.model.bind("change", this.render, this);
this.model.bind("destroy", this.close, this);
},
render:function (eventName) {
$(this.$el).html(this.template(this.model.toJSON()));
return this;
},
close:function () {
$(this.el).unbind();
$(this.el).remove();
}
});
HTML
<script type="text/template" id="tmpl_sourcelist">
<div id="source">
<a href='#Source/<%=id%>'<%=name%></a>
</div>
</script>
obrigado