title: Understanding how to use require js combined with text js to load html templates inside a backbone application
body: <p>I am learning backbone js, trying to make a small project.</p>
  
  <p>In the  of te page, I load require.js and text.js from the cloudflare CDN</p>
  
  <pre><code>&lt;script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.8/require.min.js"&gt;//&lt;/script&gt;
  
  &lt;script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require-text/2.0.10/text.js"&gt;//&lt;/script&gt;
  </code></pre>
  
  <p>I have made a backbone view called "Boxes":</p>
  
  <pre><code>var Boxes = Backbone.View.extend({
  
          // Choose an element.
          el : '.content',
  
          render : function () {
  
              // Captur "this" -&gt; the backbone view itself.
              var that = this;
  
              $(this.el).html('how do I load a html template here?');
  
          }
      });
  </code></pre>
  
  <p>Problems: </p>
  
  <ol>
  <li><p>When I add the text.js plugin to the page, I get the following error: </p>
  
  <p>Mismatched anonymous define() module: function (module) { 'use strict'; ......</p></li>
  </ol>
  
  <p>So I can't have the require.js and the text.js both loaded, it gives me the above error even on a blank page without any other scripts on it.</p>
  
  <ol>
  <li>After I make the require js work with text js, how do I load an html template for that view?</li>
  </ol>
  
  <p>Right now I know how to do it when I write my templates inline, in the index.html page.</p>
  
  <p>I do it like this:</p>
  
  <pre><code>var Boxes = Backbone.View.extend({
  
      el : '.content',
  
      render : function () {
  
          var that = this; // This backbone view
  
          var template = _.template($('#user-list-template').html(), {});
  
          that.$el.html(template);
      }
  });
  </code></pre>
  
  <p>Thank you!</p>