开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜