标签: ember.js
假设你有
var A = Ember.Object.extend({}); A.reopenClass({ myVariable: 'hello' }); var a = A.create();
a是否有办法获取A对象以获取myVariable值?
a
A
myVariable
答案 0 :(得分:1)
您可以使用a.constructor
a.constructor
a.constructor === A
a.constructor.myVariable === A.myVariable