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

Mustache: Interpolated values when iterating through an Observe.List fail if not surrounded by a DOM node #153

Closed
andykant opened this issue Nov 14, 2012 · 1 comment
Labels
Milestone

Comments

@andykant
Copy link
Contributor

The following template fails with DOM node not found:

template = "{{ #todos }}{{ name }}{{ /todos }}";
data = { todos: new can.Observe.List([{id: 1, name: 'Dishes'}]) };

This templates works if todos is a plain array or if {{ name }} is changed to <span>{{ name }}</span>.

Originally reported here.

@andykant
Copy link
Contributor Author

This also occurs in EJS with the equivalent template:

template = '<% can.each(todos, function(todo) { %><%= todo.attr("name") %><% }) %>'

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

No branches or pull requests

1 participant