You need to declare price
as a computed property, which depends on total_price
and re-executes whenever total_price
changes. Not really sure where your total_price
variable lives, but assuming it's defined on the same controller then you could do something like this:
App.QuestionController = Ember.ObjectController.extend({
total_price: null,
price: function() {
return this.get('total_price');
}.property('total_price')
});
Hope it helps.