app.component.html
<div *ngFor="let file of files">
<p>value : {{file.type}}</p>
<p>bool : {{file.type === FileAccessType.ENTRY_CREATE}}
</div>
app.component.ts
export class AppComponent{
files : FileAccess[];
FileAccessType : FileAccessType;
}
file-access.ts
export interface FileAccess {
path: string;
type: FileAccessType;
timestamp: number;
}
file-access-type.ts
export enum FileAccessType{
ENTRY_CREATE,
ENTRY_DELETE,
ENTRY_MODIFY
}
the boolean comparison in template does not work as expected
{{file.type === FileAccessType.ENTRY_CREATE}} //always gives false
ref : stackblitz
In app.component you should declare your enum variable like this
readonly FileAccessType = FileAccessType;