简体   繁体   English

Meteor Handlebars:如何访问普通阵列?

[英]Meteor Handlebars: How to access a plain array?

var plain_array = [1, 2, 3, 4, 5, 6, 7]

How can I show all elements in Meteor Handlebars? 如何显示Meteor Handlebars中的所有元素?

{{#each plain_array}}

# What to put here to get the elements?

{{/each}}

(This question is similar: handlebars: how to access an array? but not the same as the other question presumes an array of objects.) (这个问题类似: 把手:如何访问一个数组?但与另一个问题不一样,假定一个对象数组。)

From Handlebars documentation . 来自Handlebars文档

{{#each people}}
  <li>{{this}}</li>
{{/each}}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM