【发布时间】:2015-09-03 03:26:17
【问题描述】:
在我的 Meteor 应用中,我正在发布:
ForeignVisaTypes = new Mongo.Collection("foreignVisaTypes");
if (Meteor.isServer) {
Meteor.publish("foreignVisaTypes", function () {
return ForeignVisaTypes.find();
});
}
...并订阅:
if (Meteor.isClient) {
Meteor.subscribe("foreignVisaTypes");
. . .
}
...一个集合,其中 填充了值。
但是,这种填充选择的尝试失败了:
<select name="selvisatype" id="selvisatype" title="Please select a visa type">
{{#each foreignVisaTypes}}
<option value={{value}}>{{display}}</option>
{{/each}}
</select>
为什么会失败?
【问题讨论】:
-
你在哪里定义
foreignVisaTypes助手?
标签: mongodb meteor html-select