Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
208 views
in Technique[技术] by (71.8m points)

javascript - 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.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From Handlebars documentation.

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...