I know Backbone.js’s View object has parameters like id, tagName, className.
var DocumentRow = Backbone.View.extend({
tagName: "li",
className: "document-row",
});
It uses these for the insert template’s parent element. When I do not set them, it will add a <div> to the template as the template’s parent.
But it really annoys me because sometimes I don’t need the parent! All I need I already have in my template, so how can I cancel it?
This states that the view is to be bound to a pre-existing element as specified by the
elproperty. Look up the docs at backbonejs.orgSince you already have it in your template just create and bind this view to it “after” the template is created (perhaps in a separate function?)