lundi 1 août 2016

ember js get form select after submit

Tried to search some example with form select list but seems they always take value by using onchange function http://ift.tt/1PG5iIQ

However in my project I want something like this:

<form >
    <p></p>
    <p>
            <select name="lang" id="lang">
                            <option value="">--Choose--</option>
                            
                            <option value=""></option>
                            
            </select>
    </p>
</form>

In my controller I have:

 actions:{
    createBook() {
                var title = this.get('title');  //This line works fine
                var lang = this.get('lang'); //This value from select isnt working at all
                //do stuffs ..
            },

}

What can i do so that i can get the value from select in createBook() actions?




Aucun commentaire:

Enregistrer un commentaire