我是新手,试图弄明白:
这是我目前的代码(为简洁而截断)。任何帮助指出我正确的方向赞赏。
模板(EditRoom.hbs):
{{view Ember.Select
content=options
optionValuePath="content.id"
optionLabelPath="content.name"
prompt="Choose an option..."
}}
<div class="filter">
//This is where the models will be outputed
{{#each filter1}}<a></a>{{/each}}
{{#each filter2}}<a></a>{{/each}}
</div>
控制器:
App.EditRoomController = Ember.ObjectController.extend({
// Select dropdown
options: [
{text: "filter1", id: 1},
{text:"filter2", id: 2}
]});
路线:
App.EditRoomRoute = Ember.Route.extend({
model: function(params) {
return Ember.RSVP.hash({
filter1: this.store.find('filter1'),
filter2: this.store.find('filter2')
});
}
});