Skip to content

Instantly share code, notes, and snippets.

@vladimirlukyanov
Created February 22, 2021 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladimirlukyanov/543926bc29b34c050c60b65c39a6d1e8 to your computer and use it in GitHub Desktop.
Save vladimirlukyanov/543926bc29b34c050c60b65c39a6d1e8 to your computer and use it in GitHub Desktop.
Render Vue.js from string or AJAX call context
let el = Vue.compile(`<MuiIcon icon="${icon}" />`);
el = new Vue({
components: {
MuiIcon
},
vuetify,
render: el.render,
staticRenderFns: el.staticRenderFns
}).$mount();
return el.$el.outerHTML;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment