I just started using Vue.js and Vue CLI and i'm facing an issue, i don't understand why i can't set the image dynamically from the scope but i can do it writing it directly in the HTML, obj.img is a string with @/assets/logo.png
value too. I have a timeout faking an ajax call, but the browser does not resolve properly the routes for the image.
<div slot="media">
<img :src="obj.img"> <!-- http://localhost:8080/@/assets/logo.png -->
<img src="@/assets/logo.png"> <!-- http://localhost:8080/img/logo.82b9c7a5.png -->
</div>
Also, why are the routes different? Any ideas?
./assets/logo.png
in you data object property – Analyticrequire
under the hood on a computed property. Check the first answer under the first related question on the right ----> – Comply@/assets/
+ items.image)" height="200px"></v-img>` this one also solved the problem – Vega