I was wondering how to bind an action in an Ember.Select só when the user change the category i could perform other operations:
{{view Ember.Select class="form-control" id="PackCategory"
content=Categories
optionValuePath="content.categoryId"
optionLabelPath="content.name"
value=VendingAdminController.selectedPack.categoryId}}
and also how to specify the view as the target?
Thank you
Like kingpin suggested,
Just create a function in your controller that observes the value property of the {{select}}
onSelectedPackChange:function(){
//insert the code that needs to be excuted on change here
}.observes('selectedPack.categoryId')
The above code should be placed in your VendingAdminController
.
I don't have enough rep to comment on the previous answer but I think the ember syntax is observes not observe
onSelectedPackChange:function(){
//insert the code that needs to be excuted on change here
}.observes('selectedPack.categoryId')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With