问题
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