I have a template with the {{price}} property inside of it that I would like to auto-update with the current value of the JS variable "total_price". I'm trying to follow the basic concepts outlined here: http://emberjs.com/guides/getting-started/displaying-the-number-of-incomplete-todos/
Here is my code:
TEMPLATE:
<script type="text/x-handlebars" data-template-name='question'>
<div id="current-price">
{{price}}
</div>
</script>
CONTROLLER:
App.QuestionController = Ember.ObjectController.extend({
price: function() {
return total_price;
}
});
Why isn't {{price}} updating with the current value of "total_price"?