Emberjs - Ember.Select valueBinding无法正常工作

时间:2012-07-31 16:53:03

标签: javascript ember.js

我有一个简单的Ember.Select,我想使用valueBinding选项。

更改选择值应更改上面显示的值。它不是。

http://jsfiddle.net/mattkime/rDpEG/

2 个答案:

答案 0 :(得分:2)

我猜您的意思是selectionBinding,它会绑定对象,因此请使用{{App.power.label}}

<script type="text/x-handlebars">
    App Power : {{#if App.power}}{{App.power.label}}{{else}}Not yet set{{/if}}
    <hr/>
        {{view Ember.Select
        contentBinding="App.booleanOptions"
        selectionBinding="App.power"
        optionLabelPath="content.label"
        optionValuePath="content.value"
        id="emberEnhanced"
      }}
</script>

答案 1 :(得分:1)

看起来我正在询问尚未发布的功能。当前版本为0.9.8.1,valueBinding位于trunk