我有一个带有模型的主干视图。
此外,我有一个全局模型,其中包含一些特定于应用程序的东西。
现在我将此模型的更改事件绑定到我的视图的渲染方法,但这似乎不起作用。
model: new Preferences.Item(),
render: function() {
$(that.el).html(template(that.model.toJSON()));
},
initialize : function() {
this.render = _.bind(this.render, this);
// global account model holder
App.Storage.account.bind("change", this.render);
},
我必须做一些特定的绑定来附加到外部模型的事件吗?