My select element has a classic design
<select class="form-control" id="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
I want to automatically set the selected
value based on the variable from the scope {{profile.gender}}
. If the variable is Female, I want the option with that value to be selected. The challenge here is that my options don't have gender values, only strings, so I will need to match them accordingly. Is there an easy way to achieve this?