0
我試圖讓我的子視圖從父視圖繼承,但不太確定如何去做。我沒有找到類似問題的答案Backbone.js view inheritance,但真的不知道如何在我的code.Any實現它。建議多appreciated.thanksBackbone.js視圖繼承 - 如何擴展ChildViews?
win.MyApp = {
Models: {
Model_1 : Backbone.Model.extend({
}),
Model_2 : Backbone.Model.extend({
}),
Model_3 : Backbone.Model.extend({
})
},
Views: {
ViewParent : Backbone.View.extend({
}),
ViewChild_1 : Backbone.View.extend({
}),
ViewChild_2 : Backbone.View.extend({
})
},
Routers: {
MainRouter : Backbone.Router.extend({
})
},
init: function(){
router = new this.Routers.MainRouter();
Backbone.history.start();
}
}
$(document).ready(function() {
MyApp.init()
});