Connecting predefined HTML to Models and Views in Backbone

后端 未结 3 1251
走了就别回头了
走了就别回头了 2021-01-02 18:56

I\'m starting out with Backbone.js so I must say I\'m not yet very familiar with the concepts.

I have predefined HTML and I want to use Backbone to manage this. This

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 19:37

    Attach to existing html is possible, but it is not very common approach. Because of that, there is almost no real info on this :(

    You could try to follow steps described in following article: http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/

    Idea is, to add some data-attribute into rendered html, so you will be able to match model with rendered html.

提交回复
热议问题