Answer the question
In order to leave comments, you need to log in
What is the correct way to access static content in VUE2?
Good afternoon, dear colleagues.
I draw symbols dynamically on the SVG canvas.
I put the SVG file in the assets folder.
This is how it works:
<use xlink:href="../assets/test.svg#block1"/> // <- OK
<use :href="'../assets/test.svg#block1'"/> // <- NOK
<use :xlink:href="'../assets/test.svg#block1'"/> // <- NOK
<use v-bind:xlink:href="'../assets/test.svg#block1'"/> // <- NOK
<use v-bind="{ 'xlink:href': '../assets/test.svg#block1' }"/> // <- NOK
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question