I have created the dropdown of country name and setted country code as a value for each option .I want to set the default country and also the listen the selection change of the dropdown .I have tried the following code
HTML
<select class="left-float" onchange={{action selectionchange}}>
{{#each model.countries as |country|}}
<option value="{{country.code}}" value={{eq country.code "IN"}}>{{country.name}}</option>
{{/each}}
</select>
Router
App.SignupRoute = Ember.Route.extend({
model: function () {
return Ember.RSVP.hash({
countries: Countries
});
},
actions:{
selectionchange:function(value){
}
}
});
Could please help me to resolve this
Aucun commentaire:
Enregistrer un commentaire