0

How can I write and ampersand in a v-input in vue?

<v-input
   label="Terms"
    description="I agree to <a href='/legal-information/terms-conditions" target="_blank">Terms & Conditions</a>
    type="checkbox"
    :value.sync="registerDetails.terms"
    :v="$v.registerDetails.terms"
 />
DumbDevGirl42069
  • 891
  • 5
  • 18
  • 47
  • & needs to be encoded for HTML, and can be done so using `&`. Here is a [related question](https://stackoverflow.com/questions/3493405/do-i-really-need-to-encode-as-amp) – Snel23 Sep 06 '19 at 00:41

1 Answers1

2

Try the following including using the html code for ampersand as well as correcting usage of single and double quotes:

<v-input
   label="Terms"
    description="I agree to <a href='/legal-information/terms-conditions' target='_blank'>Terms &amp; Conditions</a>"
    type="checkbox"
    :value.sync="registerDetails.terms"
    :v="$v.registerDetails.terms"
 />

Hopefully that helps!

Alexander Staroselsky
  • 37,209
  • 15
  • 79
  • 91