[Vuejs]-Beginner: Vue Errors 'Vue is not defined'

0👍

You just need to put those parameters into your Vue() constructor

var app = new Vue({
  el: '#app',
  
  data: {
    product: 'Socks'
  }
});
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue practice</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"></script>
</head>

<body>

  <div id="app">
  
  <div class="product-image">
    <img src="" />
  </div>

  <div class="product-info">
    <h1>{{ product }}</h1>
  </div>

</div> 

 
</body>

</html>

Leave a comment