I have a similar choice:
App.sectors = ["Alpinism", "Climbing", "Kayaking];
{{view Ember.Select contentBinding="App.sectors"}}
Now, instead of a vector of fixed values, I would like to have a selection view populated with values coming from the server; in other words, I would like to do something like:
App.sectors = function() {
return this.store.find('sector');
}
but this will not work, since Ember says that I need to pass the vector to the contentBinding, not to the function ...
(I have a sector model defined:
App.Sector = DS.Model.extend({
description: DS.attr('string')
});
and my calm server responds correctly to the request for EmberData in the domain / sectors.
source
share