Meteor 定价 table 问题

Meteor pricing table issue

因此,我正在为 mdl 构建定价 table,并且我正在尝试使用模板填充不同的计划选项,但我在显示计划的功能部分时遇到了问题。它看起来像:

这是我希望它看起来像的代码笔:http://codepen.io/sylverfyst/pen/QyVYmK

谁能告诉我 Javascript 中的 blaze PlansRowOne 和 PlansRowTwo 对象哪里出错了?我认为它可能是嵌套的功能:[],但我不知道它的实际语法是什么。

这是我到目前为止尝试过的方法:

外层HTML

<template name="sell">
  <div>
  <div class="mdl-grid">
    <div class="mdl-cell mdl-cell--12-col"><h1>CHOOSE A PLAN TO JOIN TODAY</h1></div>
    <div class="mdl-cell mdl-cell--3-col"></div><!-- Spacer -->
      {{#each PlansRowOne}}
          {{> pricingItem}} 
      {{/each}}
    <div class="mdl-cell mdl-cell--3-col"></div><!-- Spacer -->
      {{#each PlansRowTwo}}
          {{> pricingItem}} 
      {{/each}}
      <div class="mdl-cell mdl-cell--3-col"></div><!-- Spacer -->
    </div>
  </div>
</template>

Javascript 文件

Template.sell.helpers({
  PlansRowOne: [
    {title: "Basic 6 Month", Dollars: ".", Cents: "95", term: "/6 Months", Features: [{feature: "1 Listing for your Business"}, {feature: "Searchable Listing"}, {feature: "Ads on Listing"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "X"}]},
    {title: "Basic 3 Month", Dollars: ".", Cents: "95", term: "/3 Months", Features: [{feature: "1 Listing for your Business"}, {feature: "Searchable Listing"}, {feature: "Ads on Listing"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "X"}]},
    {title: "Showcase 6 Month", Dollars: ".", Cents: "95", term: "/6 Months", Features: [{feature: "1 Listing for your Business"}, {feature: "Searchable Listing"}, {feature: "Ads on Listing"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "1st in Search Listings"}]},
  ],
  PlansRowTwo: [
    {title: "Professional Silver", Dollars: ".", Cents: "95", term: "/Month", Features: [{feature: "One Time Set Up Fee of .95"}, {feature: "10 Searchable Listings"}, {feature: "Ads on Listings"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "X"}]},
    {title: "Professional Gold", Dollars: ".", Cents: "95", term: "/Month", Features: [{feature: "One Time Set Up Fee of .95"}, {feature: "10 Searchable Listings"}, {feature: "No Ads on Showcase Listings"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "2 Showcase Listings"}]},
    {title: "Professional Platinum", Dollars: "4.", Cents: "95", term: "/Month", Features: [{feature: "One Time Set Up Fee of .95"}, {feature: "10 Searchable Listings"}, {feature: "No Ads on Showcase Listings"}, {feature: "Upload Photos"}, {feature: "Unlimited Categories"}, {feature: "5 Showcase Listings"}]},
  ]
});

内HTML

<template name="pricingItem">
  <div class="pricing-item mdl-cell mdl-cell--2-col mdl-shadow--2dp">
    <div class="pricing-title">
      {{title}}
    </div>
  <div class="pricing-value">{{Dollars}}<span class="smallText">{{Cents}}</span>
    <span class="undertext">{{term}}</span>
  </div>
  <ul class="mdl-list list">
    {{#each features}}
      <li class="mdl-list__item">{{feature}}</li>
    {{/each}}
  </ul>
  <div class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent mdl-button--raised button">Subscribe</div>
  </div>
</template>

这里:

{{#each features}}
  <li class="mdl-list__item">{{feature}}</li>
{{/each}}

在你的数据中是:

Features: [...]

所以打错了。