I have created the following
export enum status {
Draft = 1,
Publish = 2,
OnHold = 3,
Completed = 4
}
In the ts file I declare it as follows and give it a default value
courseStatus: status = status.Draft;
However, in the HTML it gives me an ID when using the following:
<label [for]="'status'">{{courseStatus}}</label>
I tried adding another variable - but this still gives a number (as per link)
courseStatusValue: string = this.courseStatus.toString();
My API returns an ID. Its this ID I want to convert into an enum value.