I often need to share a value between different parts of my UI, for example to keep two views in sync. To do that, I want to be able to bind the view-models behind those views to the value I need to share so that each view-model can track changes to the shared value and report those changes to its view.
Typically, the shared value is encapsulated in a service whose purpose is to share data. The bindings would look like this:
context service
|
+--- view-model --- view
|
+--- view-model --- view
Can I set up this kind of view-model-to-service binding using the new facilities in Ext JS 5 or can I only bind views to view-models? If I can only bind views to view-models, what motivated the decision not to support a more general-purpose binding mechanism between objects?
thanks
Typically, the shared value is encapsulated in a service whose purpose is to share data. The bindings would look like this:
context service
|
+--- view-model --- view
|
+--- view-model --- view
Can I set up this kind of view-model-to-service binding using the new facilities in Ext JS 5 or can I only bind views to view-models? If I can only bind views to view-models, what motivated the decision not to support a more general-purpose binding mechanism between objects?
thanks
Aucun commentaire:
Enregistrer un commentaire