How to handle initializing and rendering subviews in Backbone.js?

前端 未结 7 1177
北海茫月
北海茫月 2020-11-29 14:38

I have three different ways to initialize and render a view and its subviews, and each one of them has different problems. I\'m curious to know if there is a better way that

7条回答
  •  死守一世寂寞
    2020-11-29 14:54

    I'm not sure if this directly answers your question, but I think it's relevant:

    http://lostechies.com/derickbailey/2011/10/11/backbone-js-getting-the-model-for-a-clicked-element/

    The context in which I set up this article is different, of course, but I think the two solutions I offer, along with the pros and cons of each, should get you moving in the right direction.

提交回复
热议问题