나는이 같은 컬렉션이 있습니다유성 블레이즈 디스플레이 배열
내가 예를 들어 object.questions.teema를 반복하고 싶습니다.
Template.game.helpers({
theGame: function() {
var theGame = Game.findOne({_id:"LhQmaZKW8eJNenyX9"})
console.log(theGame)
return theGame
}
});
및 템플릿 :
<template name="game">
{{#with theGame}}
{{#each theGame.questions}}
{{teema}}
{{/each}}
{{/with}}
</template>
그러나이 작업을 나던, 템플릿 잘못된 것입니다
나는 도우미가 있나요?
그래서 이런 식으로 뭔가 : {{#with theGame}} {{#each의 theGame.questions}} {{#each의 questions.teema}} {{TEEMA}} {{/ 각}} {{/ each}} {{/ with}} 이 중 하나가 작동하지 않는 것 같습니다 – Villemh
아니요. 시험용 코드로 수정 된 답변. 먼저 2 레벨 어레이가 필요한 이유를 확인하십시오. – ghybs
좋은 제안 이었지만 2 레벨 어레이가 필요하지 않았습니다. 고맙습니다. – Villemh