1

I passed <router-link> with ${...} for home page and without ${...} for log in page, but none works when passed in template.

data(){
  return {
    content: `
        <p>Click ${<router-link to="{name: 'home'}">homepage</router-link>} 
        or <router-link to="/login">login</router-link> to proceed.</p>`
  },
}

passing the data in templates:

<h2 v-html="item.content"></h2>

and the output is:

enter image description here

and this's how it looks in console:

enter image description here

Can anyone help so it works as a links and go to the route? Thank you in advance.

SoyChai
  • 320
  • 2
  • 11
Mir Stephen
  • 1,758
  • 4
  • 23
  • 54

0 Answers0