【发布时间】:2015-05-14 23:05:26
【问题描述】:
{{> myTemp}} 工作正常,但 {{> Template.dynamic template="myTemp"}} 产生
未捕获的错误:{{#each}} 目前只接受数组、游标或错误值。
不知道去哪里看
-- 更新以添加每个块--
{{#each this}}
<section class="blog-post">
{{#if isInRole 'mdblog-author'}}
{{> blogControls }}
{{/if}}
<header>
<h2><a href="{{pathFor route='blogPost'}}">{{title}}</a></h2>
<span class="info">{{_ "posted_by"}}<span class="author">{{author}}</span>
<time>{{mdBlogDate date}}</time>
</span>
</header>
<summary>
{{{summary}}} <a href="{{pathFor route='blogPost'}}">{{_ "read_more"}}
<i class="fa fa-long-arrow-right"></i></a>
</summary>
</section>
{{else}}
{{_ "waiting_for_posts"}}
{{/each}}
【问题讨论】:
-
你能用你正在迭代的辅助变量显示#each循环吗?
-
更新问题@MattK
标签: meteor meteor-blaze