April 2017
Intermediate to advanced
454 pages
12h 51m
English
In this recipe, we will create a simple country selector. I will start by writing the selector without the help of Vue, just to brush up on HTML. First, create a form in which to put the select element:
<form> <fieldset> <legend>Choose your country</legend> <!-- here goes the select element --> </fieldset> </form>
Inside the fieldset, write the code for the select element:
<select> <option>Japan</option> <option>India</option> <option>Canada</option> </select>
Run the application. There you have a working select element right from the start. The anatomy is pretty simple. Every <option> will lengthen the list of things to choose from.
For now, there is not much to be done with this element. Let's bind the chosen ...
Read now
Unlock full access