search

Home  >  Q&A  >  body text

laravel - How to parse variables in a tag when using vuejs?

When using vuejs, how to parse variables in a tag?
For example, this one:

<a href="/articles/@{{ item.id }}/edit"></a>

What you see in the browser debugging window when you press F12 is like this, but it cannot be parsed:

<a href="/articles/{{ item.id }}/edit"></a>

How to write it?

过去多啦不再A梦过去多啦不再A梦2827 days ago525

reply all(4)I'll reply

  • 習慣沉默

    習慣沉默2017-05-16 16:48:42

    /q/10...

    You can take a look at my previous answers

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 16:48:42

    :href="JS expression"

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 16:48:42

    Why add @?

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 16:48:42

    href is an attribute, not content. You cannot use {{}} to bind data. You must use the form: href="expression"

    reply
    0
  • Cancelreply