0
是否可以添加集合作爲backbone.js中不同集合的模型?將集合添加到backbone.js中的另一個集合
我有這樣的事情:
var Stroke = Backbone.Collection.extend({
model: Point
});
var StrokeCollection = Backbone.Collection.extend({
model: Stroke
});
當我嘗試添加到我的行程集合:
this.strokeCollection.add(new Stroke);
我收到以下錯誤:
TypeError: Object false has no method 'bind'
我想你在這裏沒有有效的模型。這樣做來驗證它是你的模型是破壞: this.strokeCollection.add(new Backbone.Model); – 2012-01-13 21:59:21