V
V
Vyacheslav Barsukov2020-09-10 16:38:16
JavaScript
Vyacheslav Barsukov, 2020-09-10 16:38:16

How to reload Vue after loading code?

There is a code that pulls svg from the site
In SVG, @click is assigned to some objects.
If I insert the svg into the template right away, everything works, but if I load the svg after the page loads, then the click will not work.
How to fix?

<div class="col-md-12 svg-container" v-html="svg">

            </div>


axios.get( 'site/svg').then(response => {
            this.svg = response.data
        })

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-09-10
@slavabars

v-runtime-template

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question