component / reactive

Tiny reactive template engine
382 stars 48 forks source link

propagation doesn't work with set() and nested object #147

Closed mainiak closed 10 years ago

mainiak commented 10 years ago
var
    view,
    data,
    template,
    query = require('query'),
    reactive = require('reactive');

template = '<ul each="nested.arr">' +
    '<li>[{x},{y}]</li>' +
    '</ul>';

data = {nested: {arr: [{x: 0, y:0},{x:1,y:1}]}}; // this works

view = reactive(template, data);
query('#target').appendChild(view.el);

view.set('nested', {arr: [{x: 1, y: 2},{x: 3, y: 4}]},{x: 5, y: 6}); // this doesn't work

versions:

 "dependencies": {
    "component/reactive": "^1.1.1",
     "component/query": "~0.0.1"
  }