5
최근에 경로/컨트롤러 /보기에서 Ember.js was updated so that action event handlers are defined in an actions
object입니다. 결과적으로 이벤트 핸들러는 더 이상 프로토 타입에 대한 정상적인 메소드가 아닙니다.Ember 컨트롤러의 이벤트 처리기에서 'super'호출
extend
을 사용하여 (예를 들어) 컨트롤러를 서브 클래 싱하는 경우 수퍼 클래스의 처리기를 재정의하고 호출 할 수 있습니까?
그냥 _super
가 작동하지 않습니다 전화 :
FormController = Em.ObjectController.extend({
actions: {
submit: function() { this.get('model').save(); }
}
});
SpecialFormController = FormController.extend({
actions: {
submit: function() {
this.set('special', true);
this._super(); // doesn't work
}
}
});