ObjectToArrayPipe¶
Source | ObjectToArray |
---|
Transforms an object into an array, to easily *ngFor repeat for an object.
Example¶
- typescript
this.listObj = {
a: {
name: 'a'
},
b: {
name: 'b'
},
c: {
name: 'c'
}
}
<div *ngFor="let entry of listObj | ObjectToArrayPipe">
{{ entry.name }}
</div>
will render: a, b, c