I am working on an Aurelia tutorial, but I intentionally use only ES5 and AMD / RequireJS, as I am initially trying to reduce the technical overload that I might need to introduce in my current production application (which currently uses Angular, but I'm considering exchanging for Aurelia instead Angular 2), but I'm stuck with working with computed properties.
I noticed that an update in April removed the computed function from the Object prototype, which allowed the following syntax to be used, but I have nothing to do instead of the following syntax:
Welcome.computed({
fullName : function() { return this.firstName + " " + this.lastName; }
});
I can achieve the same effect with the following, but it seems pretty verbose, given what is being achieved! Is there a proper way to Aurelia?
Object.defineProperty(
Welcome.prototype,
"fullName",
{
get: function() { return this.firstName + " " + this.lastName },
enumerable: true
});