How to solve Interpolation inside attributes has been removed. Use v-bind or the colon shorthand ? Vue.JS 2
Use javascript code inside v-bind
(or shortcut ":") :
:href="'#purchase-' + item.id"
and
:id="'purchase-' + item.id"
Or if using ES6+:
:id="`purchase-${item.id}`"
If you're pulling data from an object and images from the src/assets folder, you need to include require('assets/path/image.jpeg') in your object like I did below.
Working example:
people: [
{
name: "Name",
description: "Your Description.",
closeup: require("../assets/something/absolute-black/image.jpeg"),
},
Not in your v-img element -- Don't work
<v-img :src="require(people.closeup)"></v-img>
Use v-bind or shortcut syntax ':' to bind the attribute. Example:
<input v-bind:placeholder="title">
<input :placeholder="title">