Rendering models in tables produces different results than an equivalent observe #202

daffl opened this Issue Dec 10, 2012 · 0 comments


None yet

1 participant


The following test renders


instead of the expected

test("Model Test", function() {
    var renderer = can.view.mustache('<table>{{#data}}<tbody>{{#rows}}<tr></tr>{{/rows}}</tbody>{{/data}}</table>');
    var div = document.createElement('div');
    var dom = renderer({
        data : new can.Model({
            rows: [{ name : 'first' }]
    var expected = "<table><tbody><tr></tr></tbody></table>";
    same(div.innerHTML, expected);

Setting the data to a can.Observe renders the expected output as well as changing the template to



@daffl daffl closed this in 6d1a372 Dec 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment