I have a small helper which calculates an average by calling my method on the server side.
Template.replyDoc.helpers({
averageVote : function(userId){
var question = Template.parentData();
Meteor.call("averageVote",question._id,userId,function(error,result){
console.log('average: ' + result);
return result;
});
}
});
then I am trying to render my helpers results in my template:
<template name="replyDoc">
<div class="list-group-item">
AVERAGE:{{averageVote userID}}
</div>
</template>
average value is calculated properly as console.log works fine but i cannot see it rendered. Why is it the case and how I should solve it please?