SteveSanderson/knockout — Issue #235: How to share VM aware models across different VMs
Author: kapv89
Created: 2011-12-20 04:35:56+00:00
State: open

I am basically looking for a design pattern or something which would allow same set of objects to be shared across different VMs .. do note that when making templates, i use data-bind only (no jquery.tmpl stuff), and when using nested templates, the only way I found for an object(which is in another object) to be aware of the VM to use(for handling events like click etc) was to store the pointer to VM in the object itself. This makes it impossible to share a single set of data across different VMs whose bindings have been applied to different sections of the dom.

In other words .. how do i make actions handled by different VMs to modify same set of data which should be shared by all the VMs (by having the same object which holds all data as their prototype)