我有以下代码:
JS:
MapSearch.FiltersList = Ember.Object.extend({
content: [
Ember.Object.create({textValue: "Gender", actualValue: "gender"}),
Ember.Object.create({textValue: "Marital Status", actualValue: "msc105"}),
Ember.Object.create({textValue: "Council Tax Band", actualValue: "thc140"}),
Ember.Object.create({textValue: "Length Of Residency", actualValue: "mhc117"}),
Ember.Object.create({textValue: "Household Composition", actualValue: "mhc110"}),
Ember.Object.create({textValue: "Income Value Banded - Profiling", actualValue: "mgc131"}),
Ember.Object.create({textValue: "Property Value Banded - Profiling", actualValue: "mgc111"}),
Ember.Object.create({textValue: "Property Value Banded - 10% UK", actualValue: "mgc112"}),
Ember.Object.create({textValue: "Landscape Lifestyle", actualValue: "mgc120"}),
Ember.Object.create({textValue: "UK Lifestyle Group", actualValue: "bgc422"}),
Ember.Object.create({textValue: "UK Wealth Group", actualValue: "bgc422"})
]
});
MapSearch.FilterSelect = Ember.Select.extend({
attributeBindings: ['name', 'id'],
contentBinding: 'MapSearch.FiltersList.content'
});
车把:
{{view MapSearch.FilterSelect name="filter_type" id="filter_type" class="filter_type" optionValuePath="actualValue" optionLabelPath="textValue"}}
但是我得到一个空白选择。我知道我做错了什么,但不知道是什么。