I'm stuck so any help really appreciated. I've tried lots of things - new to meteor and can't get the #each
in template hand to show anything
See my meteorpad http://meteorpad.com/pad/FqMJWySAMZGcyaTf6 or see code below.
<template name="player">
<div>{{_id}}</div>
<div class="name">{{name}}</div>
<div class="score">{{score}}</div>
<div>{{>cards hand}}</div>
</template>
<template name="cards">
<div>
{{#each hand}}
<span>{{this}}</span>
{{/each}}
</div>
</template>
On client - response is showing correctly in console.log below:
Template.cards.hand = function(){
if (Players.find().count() > 0 )
{
Meteor.call("deal", playerNum,function(err,response){
if(err){
console.log("error dealing: " + err);
}
console.log("in player hand" + response);
return response;
});
}
};