I've been using this.$el
all over my backbone app like so:
render: function() {
this.$el.html(this.template);
},
then I saw code online that uses:
render: function() {
var dict = this.model.toJSON();
var html = this.template(dict);
$(this.el).append(html);
}
What is the difference between the two?
$el
is. Someone using$(this.el)
learned Backbone in the old days (or learned from a tutorial based on an old version), that's all. – Roemer