I am having trouble to understand how to pass a value to vue through html, it always gives me this error: Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead
Edit: I want to pass the value "country" to the vue instance, this does not work, can someone give me an example on HTML and vue side please??
This is my code:
HTML
<div id="image-slider" :country="@{{country}}">
<template id="slider-template">
<p>
<a class="featured-providers-arrow-left" @click="prevRow"><img src="{{route('cacheImage', ['newDesign', 'arrow.png']) }}"/></a>
</p>
<a class="featured-providers-arrow-right" @click="nextRow"><img src="{{route('cacheImage', ['newDesign', 'arrow.png']) }}"/></a>
</template>
</div>
VUE
new Vue({
el: '#image-slider',
data: {
providers: []
},
mounted(){
this.country = this.$el.attributes.country.value;
this.$http.get('/provider-' + this.country).then(response => response.data = this.providers);/*this.providers = response.data);*/
},
currentNumber: 0,
timer:null
}