Accessing parent class in Backbone

后端 未结 8 875
广开言路
广开言路 2020-12-07 14:40

I need to call the initialize method of the parent class, from inside the inherited MyModel-class, instead of completely overwriting it as I am doi

8条回答
  •  孤城傲影
    2020-12-07 15:16

    this seems to be almost a duplicate of Super in Backbone, so you want something like this:

    Backbone.Model.prototype.initialize.call(this);
    

提交回复
热议问题