Backbone: multiple View Models for the same model

前端 未结 4 1207
暗喜
暗喜 2021-02-05 23:25

Newbie backbone question:

Context: Building a shopping list with backbone

I have a model class called with name, description and tags (array) properties. I would

4条回答
  •  滥情空心
    2021-02-05 23:34

    I'm pretty new to Backbone.js myself, so take this answer with a grain of salt, but I think ... you just make the second view. The whole point of de-coupling models and views is to make it so that you don't need to do anything to the models if all you want to do is do something different with your views.

    So, I think you just need to create YourView2, tell it to use the same model as YourView1 and you should be in business.

提交回复
热议问题