Use javascript code inside v-bind
(or shortcut ":") :
:href="'/Library/@Model.Username' + myVueData.Id"
and
:id="'/Library/@Model.Username' + myVueData.Id"
Update Answer
Some directives can take an “argument”, denoted by a colon after the directive name. For example, the v-bind
directive is used to reactively update an HTML attribute:
<a v-bind:href="url"></a>
Here href
is the argument, which tells the v-bind
directive to bind the element’s href
attribute to the value of the expression url. You may have noticed this achieves the same result as an attribute interpolation using href="{{url}}"
: that is correct, and in fact, attribute interpolations are translated into v-bind
bindings internally.