Relationship between view and model in Backbone.js
In Backbone.js, how does a view know what model it represents?
Is it necessary for the view to be named Model_NameView? Because I can't find any other View property or function for settin开发者_如何学Cg the model (like collection has the model property, to define what models this collection is of)
As you can see at http://documentcloud.github.com/backbone/#View, there is a model
property for each view. In other words, you do not have to name the view and model anything in particular.
精彩评论