The dropdownlist is white/empty. I would like to put a title for example Choose
.
I tried adding <optgroup label="Choose">/ </optgroup>
but I want the title to be in the input before that the user clicks on the dropdown.
How to do this?
<select [(ngModel)]="type" name="type" class="form-select" style="width: 10%">
<optgroup label="Choose ">
<option value="Y">Yes</option>
<option value="N">No</option>
</optgroup>
</select>
Here is a reproduction on Stackblitz.
Thanks