我正在尝试遍历 Jade 中的一组数组。我似乎已经达到了极限。
div().slidePreview
ul
each slide in slides
div
each section in slide
li
each image in section
img(class= image.orientation, src='http://stevepainter.s3.amazonaws.com/images/thumbs/' + image.filename)
少一次迭代,它工作正常(即幻灯片[0] 中的每个部分)。如果我 console.log(image) 我得到完整的对象。如果我 console.log(image.orientation) 我得到方向,但在浏览器中我得到: -
18| each image in section 19| -console.log(image.orientation) 20| img(class= image.orientation, src='http://stevepainter.s3.amazonaws.com/images/thumbs/' + image.filename) 21| Cannot read property 'orientation' of undefined> 18| each image in section 19| -console.log(image.orientation) 20| img(class= image.orientation, src='http://xxxxxxxxxxxxx.s3.amazonaws.com/images/thumbs/' + image.filename) 21| Cannot read property 'orientation' of undefined>
请帮助这正在杀死我!!!!