簡體   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