In my meteor app, I have a JSON file containing this list of languages : List of Language Codes in YAML or JSON?
Template.myProfile.helpers({
isoLang: function(){
return JSON.parse(Assets.getText("myfile.json"));
}
});
<select>
{{#each isoLang}}
whaterver i put here
{{/each}}
</select>
The problem is that no matter what i return in my helper, as soon as i save the file, my app template change to the login template (im using iron outer), and it don't understand how it's possible.
I tried to get my langauages list as a js object, but from the public folder or the myProfile subfolder (in client folder), it brings me the same problem, and no matter what i try, i never enter my {{#each}} condition.
What am i doing bad in my use of this json / js object ?
Thanks you, David