[Vuejs]-How to refference input in vue js with v-model?

0👍

When you are not using Vue as Single Component files, your data property must be an object and not a function. Change your data property to an object and then give it a try.

new Vue({
el: '#app',
delimiters: ['!!', '!!'],
data: {
   return {
      embed: {
          url: '',
          ...
      };
},
...

Also you must access your data embed.url property using “this” like how you have referenced other properties in your code.

if (this.isPaste) {
  axios.get('http://iframe.ly/api/oembed?url=' + this.embed.url + '&api_key=493c9ebbdfcbdac2a10d6b')
  .then(response => (this.embedsinfo = response))
  isPaste = false;
}

Leave a comment