I use the latest ember-latest.js from the GitHub repository.
When I try to use computed properties, it doesnt work. But when I use Ember.computed instead of just a function it works.
I think maybe are the prototype extensions disabled. But Em.EXTEND_PROTOTYPES is true. So why isn’t it working?
http://jsfiddle.net/Krutius/TmYuS/
HTML / Handlebars
<script type="text/x-handlebars" data-template-name="test">
{{test}}
</script>
Javascript
App = Em.Application.create({});
Em.View.create({
templateName: 'test',
test: function() {
return("true")
}
}).append();
To mark a function as a computed property, you have do add
.property()to your definition, see http://jsfiddle.net/pangratz666/zssx4/:Have a look at “Computed Properties” in http://emberjs.com/documentation/#toc_ember-js-at-a-glance