sammy icon indicating copy to clipboard operation
sammy copied to clipboard

template rander cannot for each?

Open PHPJourney opened this issue 6 years ago • 1 comments

I'm use sammy.template plugins rander my application. on my page foreach can't rander . give me callback error info Uncaught SyntaxError: Unexpected token ? at new Function (<anonymous>) at srender (sammy.template.js:34) at context_prototype.template [as html] (sammy.template.js:135) at context_prototype.interpolate (sammy-0.7.6.min.js:5) at Sammy.RenderContext.<anonymous> (sammy-0.7.6.min.js:5) who tell me why?

PHPJourney avatar Jun 12 '18 09:06 PHPJourney

Can you give a code sample?

Something like this should work. <% fields.forEach(function(field) { %> ..... <% }); %>

gunnar-g avatar Jan 14 '20 12:01 gunnar-g