Backbone.js - how to include an external HTML fragment
问题 I have pre-rendered HTML fragments in my filesystem. Is it possible to load HTML fragments in backbone.js ? I'm looking for something similar to ng-include of Angular.js for example, in my file system (frag.html) <h1>I'm a fragment</h1> Should be injected to the template in a given placeholder location <div id="ph"> <!-- INJECTED --> <h1>I'm a fragment</h1> </div> 回答1: Suppose, we have this placeholder: <div id="ph"></div> and this HTML in frag.html file: <div> <h1>I am</h1> <span>an HTML