I am using Ionic Creator for developing an application. While trying to add select (dropdown) I could not see any way to enter options for the dropdown?
We can access the Ionic select by using a standard <ion-select> element. A select component always used with child <ion-select-option> element. If the <ion-select-option> does not have a value attribute, then its text will be used as the value.
Selects are form controls to select an option, or options, from a set of options, similar to a native <select> element. When a user taps the select, a dialog appears with all of the options in a large, easy to select list. A select should be used with child <ion-select-option> elements.
Simple, but not liked, answer: you can't do it by drag&drop.
If you take a look at the source you get when you download from Ionic Creator, you will see it creates "just" the select
element:
<select></select>
So, you could "kind of fake it", by drag&dropping the HTML
element inside the form
element and putting the following code inside:
<label class="item item-select" name="myselect">
<span class="input-label">Input</span>
<select>
<option value="1">1</option>
<option value="2">2</option>
</select>
</label>
I don't know if in future guys from Ionic will add this. It would be probably worth it if you request it as a feature over at their (very active) forum: http://forum.ionicframework.com/
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