Reputation: 3659
I'd like to iterate each type of : List<Map<String, List<String>>>
in my angular2 template.
How can i do that ?
I guess for the list I can do <div *ngFor="let listItem of myListOfMap">
,
but I have no idea for the map inside.
Thanks
Upvotes: 1
Views: 99
Reputation: 657028
Just iterate over the keys of the map and then you can use the key to access the value:
<div *ngFor="let listItem of myListOfMap">
<div *ngFor="let key of listItem.keys">
{{key}} : {{listItem[key]}}
<div>
</div>
Upvotes: 4