0👍
I found a way around my problem using “v-bind”. I used a normal anchor tag instead of rails “link_to”.
Below is a snippet of index.html.erb
<div class='panel-footer'>
<a v-bind:href="'/maps/customer_detail?product=' + selectedProductId" class='btn btn-success'>Continue</a>
</div>
Hope this helps anyone using Vue.js inside rails html.erb files
- [Vuejs]-How to assign A block of JavaScript code in a JavaScript variable?
- [Vuejs]-Vue router check if direct route
Source:stackexchange.com