Using Ember.Select value in the controllers?
I have this sample array:
App.programmers = [
Ember.Object.create({last_Name: "Solow", id: 1}),
Ember.Object.create({last_Name: "Tom", id: 2})
];
And I have a Ember.Select that is binded to these values
{{view Ember.Select
contentBinding="App.programmers"
optionValuePath="content.id"
optionLabelPath="content.last_Name"}}
What I want to do is I want to filter the JSON response using the values
from select boxes. I am already doing this by hardcoding the value in the
controller.
App.IndexController = Ember.ArrayController.extend({
filteredContent : Ember.computed.oneWay("content"),
last : function() {
var filtered = this.get('content').filterProperty('last_name',
"solow");
this.set("filteredContent", filtered);
}
});
Now I want to do that using the select box, how will I grab the value from
select box?
No comments:
Post a Comment