Use JavaScript code inside v-bind
(or shortcut “:”):
:href="'#purchase-' + item.id"
and
:id="'purchase-' + item.id"
Or if using ES6 or later:
:id="`purchase-${item.id}`"
More Related Contents:
- Is it possible to emit from mounted in Vuejs?
- Can we make vue.js application without .vue extension component and webpack?
- Vuex – Computed property “name” was assigned to but it has no setter
- How to add external JS scripts to VueJS Components?
- Communication between sibling components in Vue.js 2.0
- How to import and use image in a Vue single file component?
- How to implement debounce in Vue2?
- Vuex – Do not mutate vuex store state outside mutation handlers
- [Vue warn]: Property or method is not defined on the instance but referenced during render
- How to listen for ‘props’ changes
- Passing props dynamically to dynamic component in VueJS
- Vuejs typescript this.$refs..value does not exist
- Which command do I use to generate the build of a Vue app?
- VueJS access child component’s data from parent
- Is there any way to ‘watch’ for localstorage in Vuejs?
- Vue – how to pass down slots inside wrapper component?
- Apply global variable to Vuejs
- Mocking methods on a Vue instance during TDD
- Vue v-on:click does not work on component
- Vue template or render function not defined yet I am using neither?
- Global data with VueJs 2
- What is nextTick and what does it do in Vue.js?
- How to make dynamic routes on the vue router?
- When should I use Vuex?
- How to use microfrontends with Vue/Nuxt?
- Vuejs: Event on route change
- Vue.js – Add class to clicked button
- How to access Vuex module getters and mutations?
- Uncaught Error: [vue-composition-api] must call Vue.use(plugin) before using any function
- Passing props to Vue.js components instantiated by Vue-router