javascript - Handlebar and script tag -
i use handlebars view nodejs. want save variable send nodejs script js :
//myvar = [{'id' : 1, ....}, ....]; var foo = '{{myvar}}'; //print [object object] console.log(foo[0].id); //print undefined {{#each}} {{./id}} {{/each}} //print '1' (ok) i must send array of object function.
thank you help.
Comments
Post a Comment