Autoform和FlowRouter在Meteor.js中具有模板级别的订阅

Autoform and FlowRouter with template level subscriptions within Meteor.js

本文关键字:FlowRouter Meteor js Autoform      更新时间:2023-09-26

我似乎无法弄清楚如何在使用FlowRouter时创建有效的自动表单"快速表单"。我不断收到此错误:

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

这是我的快速表单。在这种情况下,集合等于字符串值"页脚":

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

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

我意识到我的问题是创建集合的文件和呈现快速表单的模板文件位于单独的包中!

api.export("Footer",['client', 'server']);添加到正确的软件包中,一切正常!

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