Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript meteor blaze renderwithdata使用autoform将文档传递到模板_Javascript_Meteor_Meteor Blaze_Meteor Autoform - Fatal编程技术网

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()})};