Let's say we have an enumeration called CustomPages:
export enum CustomPages{
page1 = 1,
page2 = 2,
page3 = 3
}
Now, in our html template, let's try to access this enum.
For instance:
<a class="nav-link" [class.active]="page == CustomPages.page1" href="#">Categories and responses</a>
However, when I try to do this, it results in this error:
Cannot read property 'page1' of undefined