2013-04-08 42 views

回答

0

不是開箱即用的。

但傳遞給構造函數的所有數據被分配到您的視圖實例this.options,所以實現它在渲染功能應該是很容易的,是這樣的:

render: function(){ 
    var templateFn = this.options.template || this.template; 
    this.$el.html(templateFn(this.model.attributes)); 
    return this; 
} 

應該工作。

+0

It Works。謝謝 – 2013-04-08 07:52:42

相關問題