【发布时间】:2017-07-30 07:33:18
【问题描述】:
我遇到了aldeed:autoform 的问题,我无法解决,也不明白是什么原因。 模板:
<template name="home">
{{> quickForm collection="Posts" id="insertPostForm" type="insert"}}
</template>
路线(铁:路由器):
Router.route('/', {
name: "home",
data: function () {
return {
posts: Posts.find();
};
},
waitOn: function () {
return Meteor.subscribe("allPostHeaders");
}
});
我发布了“allPostHeaders”:
Meteor.publish("allPostHeaders", function(){
return Posts.find({}, {
fields: {content: 0}
});
});
所以在 Meteor 中我安装了 iron:router、aldeed:collection2 和 aldeed:autoform 以及 install 和 npm simpl-schema。
所以当我启动我的应用程序时会出现以下异常..
模板助手中的异常: quickFormContext@http://localhost:3000/packages/aldeed_autoform.js
我找到了post,但我没有忘记我的报价......所以有人可以帮我找到我错过的东西吗?
【问题讨论】:
-
如果你在 html 中注释掉 quickform 行,是否有效?
-
去掉模板中的 quickform 行
-
你为什么用
npm install simple-schema而不是meteor package? -
因为 aldeed:autoform 的安装指定了那个。明天我将尝试使用流星包。谢谢
标签: node.js meteor meteor-autoform