I´m starting to get familiar with backbone.js but how can I wrap the objects in something diferent than a div ? can this be done? I want to make this on my view setup.
user2461972
问问题
95 次
1 回答
4
您可以通过将 tagName 属性设置为您想要的任何内容来轻松覆盖默认标记
var ListView = Backbone.View.extend({tagName: 'li'});
var listView = new ListView();
console.log(listView.el); // logs <li></li>
查看文档
于 2013-06-08T03:53:52.250 回答