News for hackers. Stuff that matters.
Re:Vue.js: JavaScript MVVM made simple by pedalpete on Monday February 03, 2014 @02:46AM (#7169366)
Since first toying with Ember early on, I've decided that a good test of many of these MVVM libraries is to see how we can easily share data across multiple views.

I'm not entirely sure how that would work Vue.js. I suppose at some point you could have

var parent = new Vue(options); parent.$data = [object,object,object];

var child = new Vue(options); child.$data = parent.$data[i];

seems simple enough, what's your scratch test before trying a new library?

Re:Vue.js: JavaScript MVVM made simple by EvanYou on Monday February 03, 2014 @09:19AM (#7170689)
$data has to be an object, but yes you can share data between multiple ViewModels simply by assigning them. Note however this won't create nested scope between the two. To allow the child to get full access to the parent's data you need to compose them with v-component.
Re:Vue.js: JavaScript MVVM made simple by malkomalko on Monday February 03, 2014 @07:04AM (#7170174)