我正在尝试在 html 页面的 Minimongo 中访问我的 Products 集合。当我在浏览器控制台中时,我可以输入Products.findOne();
,它会返回一个产品。
但是,当我尝试从模板帮助程序返回产品时,我得到了未定义。有人想吗?
Template.Tires.onRendered(function() {
console.log(Products.findOne());
//after I return a product item, I need to modify its properties manually after it has loaded into the client
});