[Vuejs]-Using variable as a part of an URL with Vue.js

4👍

const app = new Vue({
  el: '#app',
  data() {
    return {
      company: 'google'
    };
  },

});
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.1/vue.js"></script>
    <div id="app">
      <a :href="`http://${company}.com`">Google</a>
    </div>
👤Dmytro

Leave a comment