Using a trunk and how to achieve two-way binding between a view and a model?

In particular:

1. View the contents of the controls to change, automatically update the corresponding property in the model.

2. When the model within the property changes, the automatically updated representation of this attribute corresponds to the control, and not just call view.render () to re-update the entire view.

Does anyone have a similar practice? Or any good resources to recommend, thanks a lot!

+4
source share
3 answers

this is relevant what i want: https://github.com/theironcook/Backbone.ModelBinder

The ModelBinder class contains all the logic to facilitate bidirectional binding to a view .

:)

EDIT: 20120715 ----------- This is the perfect solution for the demo: http://files.cnblogs.com/justinw/Nested_Model_bi_Binding.zip

+1
source

Rivets are another data binding framework for Backbone and other JavaScript MV * frameworks like Spine. https://github.com/mikeric/rivets

+3
source

I wrote a blog post illustrating two-way data binding between your Backbone projections and models using the Backbone.ModelBinder plugin. Here is a direct link to the post: http://niki4810.imtqy.com/blog/2013/03/02/new-post/

0
source

All Articles