我有一个Mongo.Collection,它包含'Question'对象.每个'问题'都有一个叫做的属性choices
Questions.insert({
text: 'What is the capitol of the US?',
choices: [
"Washington D.C.",
"Houston",
"New York City",
"Los Angeles"
],
correctChoice: 0,
date: new Date().toDateString()
});
Run Code Online (Sandbox Code Playgroud)
在我的模板中,我有这个:
<div class="question">
<div class="question-content">
<p>{{text}}</p>
<ul>
{{#each choices}}
//?????????
{{/each}}
</ul>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
为了使包含适当选择的列表项的无序列表更受欢迎,我应该放置什么而不是问号?
谢谢你的阅读.对不起,如果这很容易.我在Meteor还是一个小小的菜鸟.=)