0
QQ로 호출하십시오. 주어진 DB에서 각 사진을 표시하는 도우미를 설정하려고하는데 이미지를 가져 오는 데 문제가 있습니다. 다음은 MongoDB와 Meteor 템플릿에서 Meteor 도우미가있는 MongoDB를
{ "order" : 19,
"img" : "http://foo.cdninstagram.com/photo.jpg",
"time" : "99999999999",
"user" : { "username" : "ME!",
"website" : "",
"profile_picture" : "http://foo.instagram.com/foophoto.jpg",
"full_name" : "Monique Rana",
"bio" : "",
"id" : "1234567" },
"_id" : "abc123" }
내가 함께 일하고 있어요 코드입니다 : 같은
는 지금 내 DB에서 문서 보인다.
Template.currentTag.helpers({
Tag: function() {
return Tags.find().fetch();
}
});
감사 :
<template name="currentTag">
<div class="container">
<ul class="grid effect-8" id="grid">
{{#each Tag}}
<li><img src="{{Tags.img}}"></li>
{{/each}}
</ul>
</div>
</template>
및 도우미 나는 건물 해요!
그것은이었다 :) 감사 Akshat있는 커서를 이해하기 때문에 또한이
.fetch
필요하지 않습니다! – Seano314