<!-- fichier index.html -->

<!DOCTYPE html>
<html lang="fr">
  <header></header>
  <body>
    <div id="app">
      <span>{{ message }}</span>
    </div>
    <!-- chargement de la librairie Vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
      const app = new Vue({
        el: "#app",
        data: {
          message: "Hello World",
        }
      }); 

      app.message = "Salut tout le monde";
      console.log(app.$el.textContent);

      Vue.nextTick(function() {
      	console.log(app.$el.textContent);
      })
    </script>
  </body>
</html>
