简体   繁体   中英

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?

{{#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 .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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