title: Vue compile when inserting in DOM
body: <p>I need to insert a compiled element into the <code>DOM</code>, however it will be inserted into a random place, not in a pre-defined location as is documentation...</p>
  
  <pre><code>var res = Vue.compile('&lt;div&gt;&lt;span&gt;{{ msg }}&lt;/span&gt;&lt;/div&gt;')
  new Vue({
    data: {
      msg: 'hello'
    },
    render: res.render,
    staticRenderFns: res.staticRenderFns
  })
  </code></pre>
  
  <p>All approaches with <code>V-for</code>, <code>V-if/show</code> will not serve as they also require predefined elements.</p>
  
  <p>I tried something like this...</p>
  
  <pre><code>document.getElementById('elPai').insertAdjacentHTML('beforeend', Vue.compile('&lt;div&gt;&lt;span&gt;{{ msg }}&lt;/span&gt;&lt;/div&gt;'));
  </code></pre>
  
  <p>It returns an object containing ' render ' and ' StaticRenderFns ', but did not find the result compiled on these objects, it seems to me that it is recorded in a ' Promisse ', which is triggered when the element is predefined in ' DOM '.</p>
  
  <p>Finally, there is how to insert elements compiled into DOM with ' Vue 2 '?</p>