0
몇 가지 방법이있는 객체 컬렉션을 사용하려고합니다.유성우 수집 방법 사용
예 :
Targets = new Meteor.Collection("targets");
Targets.insert({
id : 0,
title : function(){
if(false){
console.log("true");
return 'Le commencement';
}
else
{
console.log("false");
return 'Le début';
}
},
text : 'Lorem ipsum dolor.',
});`
나는
Template.content.target = function() {
var currentPosition = Meteor.user().profile.position;
return Targets.findOne({id: parseInt(currentPosition)});
};
와 내 템플릿에 제목 나중에 전화 : ...
{{#if currentUser}}
<h2>{{target.title}}</h2>
<p>{{target.text}}</p>
{{/if}}
유성 반응이 완전히 무작위
가끔 i ge 내 콘솔에서 "거짓"이고 제목은 "Le début"입니다. 때로는 "르 시작"을 제목으로 사용하고 콘솔에는 아무것도 표시하지 않습니다. 때때로 나는 ...
내가 무엇을 해야할지 몰라 ... 콘솔과는 disepears 후 몇 초 동안 제목으로 "르 데뷔"두 번 "false"를 얻을어쩌면 단지 방법 mongo에 저장된 객체는 매우 나쁜 아이디어입니다.
도움 주셔서 감사합니다.
감사합니다 많이! 그것은 작동합니다 :) –