I read on ICanHaz.js documentation that i should load templates from a remote like this
$.getJSON('/myserver/templates.json', function (templates) {
$.each(templates, function (template) {
ich.addTemplate(template.name, template.template);
});
});
I have no idea how the json template should look like, would really appreciate an example ICanHaz.js json template.
Thanks
To save some time on debugging $.each requires two arguments to the callback function: iterator and actual object
Of course you must remember to set promise since these templates are loaded in async mode.