Banou26 Banou26 - 1 year ago 178
Javascript Question

How to append new components after init of the Vue [VueJS]

How to append a new element on the DOM and make that element be used by VueJS ?

For example in this the element

is not transformed into
<div class='lel'>lele</div>

Answer Source

You could use slots to with some directive to dynamically add new components:

  <slot name="item"
    v-for="item in items"
    <!-- fallback content here -->

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download