Closed danielo515 closed 5 years ago
There are a couple of issues with your example.
Moon.extend
, not Moon
.computed
object.{{keys}}
but the current syntax uses single curly braces.I'd recommend reading through the documentation or refactoring further, but I'll keep this open until I fix and document computed properties.
With the last few commits, I refactored how data is created in components. Computed properties now work like this:
Moon({
first: "John",
last: "Doe",
get full() {
return this.first + this.last;
}
});
It should be releasing soon with Moon v1 beta 3.
Hello @kbrsh I read the documentation extensively and I didn't found any reference to computed properties. If you can point me to the correct section I'll be grateful. I also researched old issues and code examples on the test folder and I tried all that I found there without luck. I didn't open the issue at first sight, I promise.
The new syntax seems nice, looking forward for it
Regards
Hello.
I'm trying to make computed properties work, but it is being an imposible task. Every time I try to access a computed property I get a different error. If I try to iterate a computed properties I get an error related to length of undefined, if I just try to sow the property I get an weird error about an unexpected token
)
: