【发布时间】:2026-01-04 08:25:01
【问题描述】:
给我以下代码:
import Authenticator from 'simple-auth-torii/authenticators/torii';
export default Authenticator.extend({
restore: function(data) {
},
authenticate: function(provider, options) {
},
invalidate: function(data) {
}
});
如何从authenticate 方法内部调用基类authenticate 方法?
【问题讨论】:
-
extend函数不是来自 ES6,是吗? -
认为是 Ember.object.extend
-
you ledged emberjs.com/guides/object-model/classes-and-instances 这就是我要找的 :)
-
虽然使用 ES6,您可能会考虑使用 calling
toMethod并使用实际的super关键字 :-)
标签: javascript ecmascript-6 ember-simple-auth