[Vuejs]-VueJS access data values from console

1👍

All properties of the app are accessible from the object returned by createApp, you just need to assign it.

import { createApp } from "vue";

const app = createApp({
  data() {
    return {
      key: "VueJS is working now",
      question: "answer",
      main_attributes: {}
    };
  },
  created() {
    this.key = "sdfgsdfgsdfgsdfg";
  }
}).mount("#project");

console.log(app.key); // logs 'sdfgsdfgsdfgsdfg'
👤yoduh

Leave a comment