I want to access the class used to instantiate an object from EmberJS. For example, given the example instance of MyWidgetClass in the example below, I would like to access the myProperty attribute of this class.
MyWidgetClass = Ember.View.Extend({});
MyWidgetClass.reopenClass({
myProperty: 'hihihi'
});
console.log("The myProperty of MyWidgetClass is ", MyWidgetClass.myProperty);
myWidget = MyWidgetClass.create({});
console.log("The myProperty of the Class of myWidget is ",
myWidget.WHAT_GOES_HERE.myProperty);
I want to know what to put WHAT_GOES_HERE in the last line of code. I tried myWidget._super, myWidget. Proto etc.
source
share