【问题标题】:Meteor Handlebars: How to access a plain array?Meteor Handlebars:如何访问普通数组?
【发布时间】:2015-07-25 02:16:11
【问题描述】:

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

如何在 Meteor Handlebars 中显示所有元素?

{{#each plain_array}}

# What to put here to get the elements?

{{/each}}

(此问题类似:handlebars: how to access an array? 但与其他问题假定对象数组不同。)

【问题讨论】:

  • {{#each array}}{{this}}{{/each}}

标签: javascript meteor handlebars.js


【解决方案1】:

来自Handlebars documentation

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

【讨论】:

    猜你喜欢
    • 2019-06-13
    • 2016-02-18
    • 2018-03-25
    • 1970-01-01
    • 2018-09-26
    • 2020-04-25
    • 2016-08-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多