The class method / property will be executed as follows:
ExampleClass = SC.Object.extend({
foo:undefined,
bar: function() {
this.foo = "Hello world";
console.log( this.foo );
}
}
ExampleClass.mixin({
classFoo: "foo",
classBar: function() {
return "Bar";
}
})
Then you can access it, for example:
ExampleClass.classFoo
But do not forget that when accessing a property (or a computed property) in an instance you need to use .get()as:
var example = ExampleClass.create();
example.get('foo');
example.set('foo', 'baz');
example.foo;
example.foo = 'baz';
source
share