[Vuejs]-Vuejs force rendering component

0👍

You can use .$mount() method and VueComponent.$el property to get html from the Vue component. like below

var component = new Vue({
  template: `<div>Your HTML is here...</div>`
}).$mount();

CODE SNIPPET

var component = new Vue({
  template: `<div>Here is your component html</div>`
}).$mount();

console.log(component.$el);
//you can use this component.$el for you maker bindPopup
//marker.bindPopup(component.$el).openPopup();
<link href="https://cdn.jsdelivr.net/npm/vuetify@1.2.2/dist/vuetify.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@1.2.2/dist/vuetify.min.js"></script>

Leave a comment