2014-10-04 62 views

回答

1

相反的this.value += 1,你需要使用Ember的對象的方法在對象上更改屬性。你可以這樣做:

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

或使用快捷

this.incrementProperty('value') 

我建議你閱讀Ember docs on the object model關於這一點,相關主題的更多信息。

+0

這很完美,謝謝。 – 2014-10-05 19:12:15

相關問題