mardi 24 février 2015

Ember Selection Box undefined on observe

I have an Ember selection box as follows:



{{view "select" class="form-control" content=chooseChannel
optionLabelPath="content.name"
optionValuePath="content.value"
value=selectedChannel
prompt="Please Select"
}}


And a function as follows:



watchtype:function(){
console.log(this.get("selectedChannel"));
}.observes('selectedChannel'),


So, The function gets triggered everytime the user selects a value in the selection box.


My problem is that the function returns undefined even though it is triggered from the change of value of the the variable.


Any idea why this happens?





Aucun commentaire:

Enregistrer un commentaire