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

Comments

Projects
None yet
1 participant
@andykant
Contributor

andykant commented Nov 14, 2012

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

This comment has been minimized.

Show comment
Hide comment
@andykant

andykant Jan 28, 2013

Contributor

This also occurs in EJS with the equivalent template:

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

andykant commented Jan 28, 2013

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