loop array of objects in meteor using jade

谁说胖子不能爱 提交于 2019-12-12 05:01:28

问题


When using blaze and handlebars, I can loop through an array of objects as follow:

{{#each cars}}
    <p>{{color}}, {{brand}}</p>
{{/each}}

How can I do this with jade?


回答1:


You have some choices:

each cars
  p #{color}, #{brand}

or

each cars
  p {{color}}, {{brand}}

or

each cars
  p
    | You can also do this:
    | #{color}, {{brand}}


来源:https://stackoverflow.com/questions/34799919/loop-array-of-objects-in-meteor-using-jade

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!