不幸的是,我四处搜索,但没有找到这个问题的副本。
文件1:
var Graph = Backbone.View.extend({
move: function() {
//some stuff
}, //more stuff
})
文件 2:
define ([ './graph.js' ]), function( graph ) {
var SubGraph = Backbone.View.extend({
// this file needs to inherit what is within the move method but extend it to include other stuff
})
如何在不破坏现有属性的情况下扩展继承的属性?