【发布时间】:2019-01-29 15:29:20
【问题描述】:
您好,我在离子应用程序中有以下 json 更新 我将其更改为从 api 获取数组,然后得到以下内容
{
"chest": {
"chest": {
"1": [
"1",
"2"
],
"3": [
"1",
"2",
"3"
]
},
"hints": {
"1": [
"test1"
],
"3": [
"test2"
]
}
},
如何使用显示键和值 我试试下面的
<ion-item *ngFor="let chest of workout.data.chest;let i=index" (click)="openNew(new.id)" detail-push >
<b> {{ chest}} </b> <br>
<span *ngFor="let exercise of chest.chest |keys ">
<span *ngFor="let hints of chest.hints |keys ">
Machine: {{exercise.key}}, Days: {{exercise.value}}
, Hints: {{hints.value}} <br>
我在上面尝试,但我在错误的地方提示,我得到重复的记录
【问题讨论】:
标签: angular ionic-framework ionic3