gpt4 book ai didi

javascript - Angular 嵌套 ng-repeat 在第三层不起作用

转载 作者:行者123 更新时间:2023-12-02 16:34:46 24 4
gpt4 key购买 nike

我正在使用以下嵌套 ng-repeat

<div class="thumbnail" ng-repeat="programme in programmes">
<h4>{{programme.title}}</h4>
<div ng-repeat="exercise in programme.exercises">
{{exercise.exerciseName}}
<ul ng-repeat"image in exercise.images">
<li>{{image}}</li>
</ul>
</div>
</div>

具有以下数量的对象(下面代表一个 programme )

[
{
"exerciseDescription": "Kneeling on the gym ball. ",
"exerciseID": 92,
"exerciseName": "4 pt Kneeling on Gym Ball - Arm and Leg Lift ",
"images": [
345,
346,
347
]
},
{
"exerciseDescription": "Laying on the gym ball with the ball/ weight directly above your head. ",
"exerciseID": 32,
"exerciseName": "Gym Ball Bridge - Double arm Med ball ",
"images": [
110,
111,
112
]
},
{
"exerciseDescription": "Sit on a gym ball with the bony points at the bottom of your bum very top of the leg in contact with the ball.",
"exerciseID": 1,
"exerciseName": "Neutral Spine on Gym Ball ",
"images": [
2,
3,
4,
5
]
}
]

这对于除第三级之外的所有其他级别都非常有效 image in exercise.image

最佳答案

您在 ng-repeat 中出现拼写错误,缺少 =:

      <ul ng-repeat="image in exercise.images">
<li>{{image}}</li>
</ul>

关于javascript - Angular 嵌套 ng-repeat 在第三层不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28001490/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com