0
當過我嘗試從子類ember.js調用基類的方法,我得到以下錯誤Ember.js如何從子類調用超類或基類方法?
斷言失敗:Ember.Object.create不再支持調用定義方法_Super
App.BaseClass = Ember.Object.extend({
sayHello: function(){
//my code
}
});
App.SubClass = App.BaseClass.extend({
//some code here
sayHellow: function(){
//some code of subclass
.
.
.
this_super(); // This causes error: Assertion failed: Ember.Object.create no //longer supports defining methods that call _super
}
});
'this_super'是一個錯字嗎? 「Hello」與「Hellow」是否有錯字? – 2015-11-04 09:40:46