[英]Why wont my meteor each function work?
I am making a web application through meteor, and recently I have set up a mongo database on it. 我正在通过流星制作一个Web应用程序,最近我已经在上面建立了一个mongo数据库。 I am now trying to display the documents through an each function with this code:
我现在正尝试通过每个函数使用以下代码显示文档:
Template.body.helpers({
gameTabs: function(){
return PopularGames.find();
}
});
and then implementing it in the html with: 然后使用以下代码在html中实现:
{{#each gameTabs}}
{{>popularGames}}
{{/each}}
It wont display the results, and when I check the chrome console, it appears that there are no documents in the database at all, even though my terminal where I am running the db says there are documents in it. 它不会显示结果,并且当我检查chrome控制台时,即使我正在运行db的终端显示数据库中也没有文档,但看来数据库中根本没有文档。 Any help would be great!
任何帮助将是巨大的!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.