繁体   English   中英

在Meteor.js中使用模板级别的订阅进行Autoform和FlowRouter

[英]Autoform and FlowRouter with template level subscriptions within Meteor.js

我似乎无法弄清楚如何在使用FlowRouter时创建有效的Autoform“ QuickForm”。 我不断收到此错误:

Exception in template helper: Error: Footer is not in the window scope

这是我的Quickform。 在这种情况下,collection等于字符串值“ Footer”:

{{> quickForm id="formView" type="insert" collection=form.collection }}

也许一个Quickform,simpleSchema和FlowRouter示例足以回答这个问题。

我意识到我的问题是创建集合的文件和呈现Quickform的模板文件位于单独的程序包中

我添加了api.export("Footer",['client', 'server']); 正确的包装,一切正常!

注意:我尚不知道这是推荐方法还是此解决方案是否存在安全性问题,因此暂时不会将其标记为正确。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM