我无法让应用程序在Meteor上运行.quickform没有链接我的Collection.
"模板助手中的异常:错误:配方不在窗口范围内"
有人可以帮到这里吗?
这是我的quickform代码
<template name="NewRecipe">
<div class="new-recipe-container">
{{> quickForm collection="Recipes" id="insertRecipeForm" type="insert" class="new-recipe-form" }}
</div>
</template>Run Code Online (Sandbox Code Playgroud)
这是我的集合架构
Recipes = new Mongo.Collection('recipes');
RecipeSchema = new SimpleSchema({
name: {
type: String,
label:"Name"
},
desc: {
type: String,
label:"Description"
},
author: {
type: String,
label:"Author",
autoValue: function() {
return this.userId
}
},
createdAt: {
type: Date,
label:"Created At",
autoValue: function() {
return new Date()
}
}
});
Recipes.attachSchema( RecipeSchema );Run Code Online (Sandbox Code Playgroud)