0
votes

I want to show updates to a value set on my controller, I have an action that will update it, but the template doesn't show these changes. If I leave the route and come back, the changes are shown.

Here is a jsbin: http://emberjs.jsbin.com/foriwu/1/edit

1

1 Answers

1
votes

Instead of this.value += 1, you need to use Ember's object methods to change properties on an object. You could do:

this.set('value', this.get('value') + 1)

or use the shortcut

this.incrementProperty('value')

I'd recommend reading the Ember docs on the object model for more info about this and related topics.