Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template rander cannot for each? #268

Open
PHPJourney opened this issue Jun 12, 2018 · 1 comment
Open

template rander cannot for each? #268

PHPJourney opened this issue Jun 12, 2018 · 1 comment

Comments

@PHPJourney
Copy link

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?

@gunnar-g
Copy link

Can you give a code sample?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants