<div id="app"></div> <div id="app2"></div>
var Vue = require("vue"); var data = global.data = { foo: { bar: "something" } }; var app = global.app = new Vue({ data: data, template: "<div>{{foo.bar}}</div><div>{{foo.bao}}</div>" }).$mount("#app"); var app2 = global.app2 = new Vue({ data: data.foo, template: "<div>{{bar}}</div>" }).$mount("#app2");
Then I invoke $add in console
data.foo.$add("bao","koo")
Nothing happened.
I think that might because data.foo has been observed as app2's root $data. So when I invoke $add, it is helpfull with app2, but it will not trigger the deps that on data.foo.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4