matth3o matth3o - 5 months ago 77
Dart Question

dart angular2 - iteration in template

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.



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]}}