0

Is it possible to put double braces {{ }} in a href tag?

<a href="{{link}}">Mylink</a>


var myObject = new Vue({
    el: '#app',
    data: {link: 'http://google.com'}
})

Thank you very much.

Hans Felix Ramos
  • 4,264
  • 3
  • 16
  • 40
superMay_2
  • 85
  • 1
  • 5

1 Answers1

4

No, is not possible. The correct way is to use v-bind:

<a v-bind:href="link">Mylink</a>

Or in shorthand:

<a :href="link">Mylink</a>
Hans Felix Ramos
  • 4,264
  • 3
  • 16
  • 40