D
D
daniel_wesson2019-04-14 12:12:31
Vue.js
daniel_wesson, 2019-04-14 12:12:31

VueJS - How to partially render a link?

There is a field: As when changing this field, its contents were immediately substituted into the link:<input type="text" v-model="client_id">

<a href="https://oauth.vk.com/authorize?client_id={{ client_id }}" class="btn btn-primary"></a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-04-14
@daniel_wesson

:href="`https://oauth.vk.com/authorize?client_id=${client_id}`"

or
computed: {
  href() {
    return `https://oauth.vk.com/authorize?client_id=${this.client_id}`;
  },
},

:href="href"
or
methods: {
  href: client_id => `https://oauth.vk.com/authorize?client_id=${client_id}`,
},

:href="href(client_id)"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question