You can just use the “keyvalue” pipe introduced in Angular 6.1.
<p *ngFor="let enum of TestEnum | keyvalue">
{{ enum.key }} - {{ enum.value}}
</p>
See here for a full example ->
https://stackblitz.com/edit/angular-gujg2e
More Related Contents:
- Angular HTML binding
- angular2: Error: TypeError: Cannot read property ‘…’ of undefined
- Angular2: Cannot read property ‘name’ of undefined
- NgFor doesn’t update data with Pipe in Angular2
- How can I write data attributes using Angular?
- Angular2 multiple router-outlet in the same template
- OrderBy pipe issue
- Angular 2 Scroll to top on Route Change
- Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘tr’ (final release)
- How to instantiate and apply directives programmatically?
- Angular 2 Read More Directive
- Angular2: How is ngfor expanded
- How to add “class” to host element?
- vs
- Angular2 – Interpolate string with html
- Angular 2 Dynamically insert a component into a specific DOM node without using ViewContainerRef
- Angular 2 input parameters on root directive [duplicate]
- What is let-* in Angular 2 templates?
- How to truncate text in Angular2?
- Angular 2: How to write a for loop, not a foreach loop
- How to detect scroll to bottom of html element
- How to check the length of an Observable array
- Angular 2 disable sanitize
- Why angular 2 ngOnChanges not responding to input array push
- Angular – Use pipes in services and components
- Deep copying objects in Angular
- HttpClient POST request using x-www-form-urlencoded
- Dynamically load a component inside a Material MatDialog
- What is the lifecycle of a service in Angular 5
- Do we need to unsubscribe from observable that completes/errors-out?