Answer the question
In order to leave comments, you need to log in
How is the view attached to the model in Backbone.js?
Hello! Understanding Backbone.js. It seems clear, models, collections, views, events. But, it’s not enough, apparently, um: understand how in Backbone.js the view is attached to the model? Save, help
Answer the question
In order to leave comments, you need to log in
No way. All by hand.
<!-- inside view init -->
this.model.on('change', function updateView() { } );
<!-- view property -->
events: {
'input keyup': 'updateModel'
}
I seem to have caught up.
So?
var personView = new PersonView({ model: person });
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question