我遇到了一个奇怪的情况,我的模板没有渲染每个字段
- 在此模板中,#each 中的所有内容都正确呈现。
- 但是,h2 中的第一个 {{photographer}} 是空白的。相同的模板。有任何想法吗?
- 使用不同的模板也会以同样的方式发生这种情况。
- 这可以在http://photo-story.meteor.com/photog/Dean上看到 完整的代码https://github.com/deanwenick/cf07-stories
非常感谢
'<template name="photog">
<h2>These are {{photographer}}'s stories</h2>
{{#each photog}}
<img src="{{photos.[0]}}" alt="great image from a story">
<div class="caption">
<h3>{{storyName}}</h3>
<p>Photographer: {{photographer}}</p>
<p>Editor: <a href="/editor/{{editor}}">{{editor}}</a></p>
</div>
{{/each}}
</template>'