Javascript meteor blaze renderwithdata使用autoform将文档传递到模板
我有以下模板:Javascript meteor blaze renderwithdata使用autoform将文档传递到模板,javascript,meteor,meteor-blaze,meteor-autoform,Javascript,Meteor,Meteor Blaze,Meteor Autoform,我有以下模板: <template name="editUser"> {{> quickForm collection="Users" doc=doc id="editUserForm" type="update"}} </template> 我想传递quickform所需的doc变量,但并不真正理解数据参数 我尝试使用以下数据: var data = {doc: Users.find({_id: feature.getId()}).fetch()};
<template name="editUser">
{{> quickForm collection="Users" doc=doc id="editUserForm" type="update"}}
</template>
我想传递quickform所需的doc变量,但并不真正理解数据参数
我尝试使用以下数据:
var data = {doc: Users.find({_id: feature.getId()}).fetch()};
但这似乎不是在变量doc中传递文档的方法
我找不到如何正确使用它,希望避免会话变量。我刚刚意识到我需要传递光标,而不是数据本身。因此,当我替换:
var data = {doc: Users.find({_id: feature.getId()}).fetch()};
与
var data = {doc: Users.find({_id: feature.getId()}).fetch()};
var data = {doc: Users.find({_id: feature.getId()})};