Wpis z mikrobloga

#javascript #vuejs
Jak wyrenderowac dynamicznie komponent wewnatrz jakeigos diva?
W sensie tworze sobie komponent poprzez:
const compA = Vue.extend({...})
i renderuje go poprzez new compA().$mount($selector)
Tylko ze renderuje sie on w miejsce tego selectora, natomiast ja bym chcial zrobic to wewnatrz, czyli jakby uzyc innerHtml ze zwyklego js'a
  • 4
via Wykop Mobilny (Android)
  • 0
@TomekABC123: za vue docsami

The provided element merely serves as a mounting point. Unlike in Vue 1.x, the mounted element will be replaced with Vue-generated DOM in all cases. It is therefore not recommended to mount the root instance to or .

I przecież wrzucenie sobie jakiegoś Child elementu i mountoeanie na niego da ci ten sam efekt co innerHTML powiedzmy