How to define enum type in Angular to not violating tslint typedef rule

后端 未结 1 1371
天命终不由人
天命终不由人 2021-01-19 19:43

To be able to use enumerations in template, we write below codes in ts file.

in workflowProgress.ts

export enum WorkflowProgress
{
    cancelled = 0,         


        
1条回答
  •  鱼传尺愫
    2021-01-19 20:03

    You can use typeof operator to "query" the type of enum:

    WorkflowProgress: typeof WorkflowProgress = WorkflowProgress
    

    0 讨论(0)
提交回复
热议问题