title: VueJS - How to initialize a template dynamically with the result of an ajax call
body: <p>I want to load the <code>template</code> for a VueJS component dynamically.  I'd like to make an AJAX call using jQuery, and whatever the server returns should be the <code>template</code> of the VueJS component.  Here's a simplified version of the code with the AJAX call removed since it's irrelevant where the data is coming from:</p>
  
  <pre><code>BoardFeed = Vue.extend
      template: '&lt;div&gt;This should be replaced&lt;/div&gt;'
      data: -&gt;
              return items: null
      created: -&gt;
          @template = "&lt;div&gt;Template returned from server, what I really want&lt;/div&gt;"
  </code></pre>
  
  <p>In the above example I'm using the <a href="http://vuejs.org/api/options.html#created" rel="nofollow">created</a> hook which I thought would be suitable for this, but the newer template is never rendered, only the older one.</p>
  
  <p>Is it possible to achieve this?  </p>