我有以下父對象:Backbone.js的懷疑
Context = {
ContextModel: Backbone.Model.extend({
//model Code
}),
ContextList:Backbone.Collection.extend({
model : Context.ContextModel
// collection Code
}),
Contexts: new Context.ContextList,
ContextView: Backbone.View.extend({
// view Code
})
}
在上面的代碼,model : Context.ContextModel
拋出一個錯誤說Uncaught ReferenceError: Context is not defined
。我已經定義了上下文對象,但不知何故它沒有看到它。有人能幫助我嗎? 謝謝
感謝。這非常有幫助 – felix