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

Handlebars not doing the substitutions correctly #44

Open
ricarcon opened this issue Feb 3, 2015 · 3 comments
Open

Handlebars not doing the substitutions correctly #44

ricarcon opened this issue Feb 3, 2015 · 3 comments

Comments

@ricarcon
Copy link

ricarcon commented Feb 3, 2015

I have the following template:

{{#each Records}} {{/each}}
Bug ID: {{ID}}{{Title}}{{Component}}{{OS}}{{Project}}
Root Cause/Resolution: {{Resolution}}
"

I have this data structure:

{"Records": [{ "Title": "some title", "Component": "some component", "OS": "Some os", "Project": "Some project", "ID": "some id"}, ... more records follow
}]
}

But it's not rendering the Title, Component, OS, Project or Resolution. Essentially all those fields are the bug ID. Somehow the substitutions are all being done inserting the ID in all of the placeholders. Is my syntax wrong or what is going on?

@ricarcon
Copy link
Author

ricarcon commented Feb 3, 2015

because of the HTML, it didn't render correctly above, but I have the #each around the tr and td tags to build that table above... fyi.

@jehugaleahsa
Copy link
Owner

Just going out on a limb. Debug your code and see what your data looks like right before calling my code.

@smurfpandey
Copy link

@ricarcon you can use markdown syntax highlighting in your comments

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

3 participants