How to Load Array values to Template Variable in Meteor?. Please see the below code and suggest me what to do?
HTML Code :
<template name="header">
<div class="header">
{{#each alphabets}}
<div class="alphabets">{{this}}</div>
{{/each}}
</div>
</template>
JS Code :
//the below array values are load dynamically above template
var Alphas = ['ALL',
'A', 'B', 'C', 'D','E', 'F',
'G', 'H', 'I', 'J','K', 'L',
'M', 'N', 'O', 'P','Q', 'R',
'S', 'T', 'U', 'V','W', 'X',
'Y', 'Z'
]
Template.header.alphabets = function (i)
{
return Alphas[i];
};