quasarframework / quasar-template-default

[DEPRECATED] Quasar App Boilerplate / Starter kit

Home Page:http://quasar-framework.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why Root component doesn't wraps all components?

aliuygur opened this issue · comments

Hello, I can't set data in root component. The root component doesn't wraps all components.

there is main.js

Vue.use(Quasar) // Install Quasar Framework

Quasar.start(() => {
  /* eslint-disable no-new */
  new Vue({
    el: '#q-app',
    data () {
      return {name: 'ali'}
    },
    router,
    render: h => h(require('./App'))
  })
})

there is ss

quasar

<Root> is used for something else.
Your root component of your app is <App>. That is also the place you should inject data if you want to. So in App.vue, not in main.js

when i type this.$root this referencing the main.js not the App.vue ?

commented

In the future, questions like this will get better attention in the forum or the chat, as was suggested in the new issue template.

http://forum.quasar-framework.org/
https://gitter.im/quasarframework/Lobby

Please only use the repo to report bugs or improvement suggestions.

Scott