In my Angular 5 application, I have defined an enumeration constant called DateRange.
export enum DateRange {
TODAY = 'Today',
THIS_WEEK = 'This Week',
THIS_MONTH = 'This Month',
THIS_YEAR = 'This Year'
}
I am looking for a way to display this enumeration in a select box within my component's HTML. Any suggestions on how to achieve this?
The desired output would be:
<select>
<option value="TODAY"> Today </option>
<option value="THIS_WEEK"> This Week</option>
<option value="THIS_MONTH"> This Month </option>
<option value="THIS_YEAR"> This Year </option>
</select>