I have this enum (I'm using TypeScript) :
export enum CountryCodeEnum {
France = 1,
Belgium = 2
}
I would like to build a select in my form, with for each option the enum integer value as value, and the enum text as label, like this :
<select>
<option value="1">France</option>
<option value="2">Belgium</option>
</select>
How can I do this ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…