Vue.js render child component to variable to be used within component

Viewed 638

I'm using webpack and vue.js 2 and vue-google-maps. I have an issue where i need to pass to a google maps component via a prop a rendered vue-template.

e.g.

    <gmap-info-window 
     :options="infoOptions" 
     :position="infoWindowPos" 
     :opened="infoWinOpen" 
     :content="infoContent" 
     @closeclick="infoWinOpen=false">
     </gmap-info-window>

i need to pass to the :content prop. something along the lines of this:

<p>
  Some Name 
  <a :href="some.url" target="_blank" @click="myFunction('param1', $route.name, param2)">some link</a>
<p>

basically i need infoContent to be the vue compiled version of the above. I can get the template e.g. by doing:

this.infoContent = myTemplate;

but that only gets me the raw unrendered version of the template if i add .render() to that i start getting errors about _vm._self is undefined"

0 Answers
Related