ngfor loop on enum js code example
Example: iterate over enum angular ngfor
home.component.html
..
<tr *ngFor="let rowName of rowNames()">
<th>{{rowName}}</th>
</tr>
home.component.ts
....
public rowNames(): Array<string> {
const keys = Object.keys(EventType);
return keys.slice(keys.length / 2);
}