How would you translate this snippet of javascript to coffeescript? Specifically I’m struggling with how to call .property() on the function definition.
MyApp.president = SC.Object.create({
firstName: "Barack",
lastName: "Obama",
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
// Call this flag to mark the function as a property
}.property('firstName', 'lastName')
});
I think this is how you’re supposed to write it:
checkout this link