0

I'm trying to simply update a variable in data through a v-model on a text input, currently it's throwing no errors, and not updating the variable. The JS is in script tags under the html, not an imported component. Any help would be amazing! :)

var vm = new Vue({
  el: '#cover',
  data: {
    message: '',
  },
  methods: {
    mirror: function() {
      console.log('mirrored')
    },
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>

<div id="cover">
  <h1><strong><span id="goldMoney">@{{ message }}</span></h1>

  <div class="mainSearch" id="vueSearch">
    <input 
      type="text" 
      name="mainSearch" 
      placeholder="Whatchya feel like?" 
      v-model="message" 
      id="searchBox"
    />
  </div>
</div>
Phil
  • 157,677
  • 23
  • 242
  • 245
rargy
  • 109
  • 1
  • 12

0 Answers0