我想在我的angular2模板中迭代每种类型的:List<Map<String, List<String>>>
。
我怎样才能做到这一点 ?
我想我可以做的列表<div *ngFor="let listItem of myListOfMap">
,
但我不知道里面的 map 。
谢谢
最佳答案
只需遍历 map 的键,然后就可以使用键来访问值:
<div *ngFor="let listItem of myListOfMap">
<div *ngFor="let key of listItem.keys">
{{key}} : {{listItem[key]}}
<div>
</div>
关于templates - dart angular2-模板中的迭代,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39912812/