Open
Description
So this issue is not about the initial rendering, it' about changing the model after the initial rendering.
For arrays and each
it works fine:
var template = '<ul><li each="list">{this}</li></ul>';
var model = {
list: ['a', 'b', 'c']
};
var view = reactive(template, model);
window.model = model;
If I load the page and then change it via the browser console with commands like
window.model.list.pop()
or window.model.list.push('d')
the view is updated automatically
If I do the same with just a simple string and data-text
instead of an array it doesn't work anymore:
var template = '<h1 data-text="title"></h1>';
var model = {
title: 'foobar'
};
var view = reactive(template, model);
window.model = model;
any changes via window.model.title = 'test'
had no effects, even if I use component model
Metadata
Metadata
Assignees
Labels
No labels