Skip to content
Advertisement

Vuejs how to use dynamical template in component?

JavaScript
JavaScript

I want to render a custom component which has a dynamical template base on user input.

when user input a specific string ([:component-1]), it will be render as a component (CustomComponent)

how to achieve this?

Thanks a lot for anyone help!

Advertisement

Answer

I figured it out by using Vue.complie

according to dynamically-fetch-and-compile-a-template-with-nuxt

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement