Having trouble retrieving values from an enum? Check out this snippet of code:
export const enum ComplianceType {
ENGINEER_ASSESMENT = 'ENGINEER_ASSESMENT',
CONSTRUCTION_COMPLIANCE = 'CONSTRUCTION_COMPLIANCE',
ARCHITECTURE_ASSIGNMENT = 'ARCHITECTURE_ASSIGNMENT',
BLUEPRINT_APPROVAL = 'BLUEPRINT_APPROVAL',
THERMAL_COMPLIANCE = 'THERMAL_COMPLIANCE',
ELECTRICITY_COMPLIANCE = 'ELECTRICITY_COMPLIANCE',
TELECOMUNICATION_COMPLIANCE = 'TELECOMUNICATION_COMPLIANCE',
WATER_COMPLIANCE = 'WATER_COMPLIANCE',
OTHER_1 = 'OTHER_1',
OTHER_2 = 'OTHER_2',
}
In the .ts
file:
import { ICompliance, ComplianceType } from 'app/shared/model/compliance.model';
Attempting to access the values with:
complianceTypeList: ComplianceType;
If you're unsure on how to get values from an enum in TypeScript, seeking advice would be helpful.