{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/2339","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/2339/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/2339/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/2339/events","html_url":"https://github.com/vuejs/vue/issues/2339","id":132486461,"number":2339,"title":"For standalone components - Need a reliable method to get the main Vue object","user":{"login":"paulpflug","id":1881921,"avatar_url":"https://avatars.githubusercontent.com/u/1881921?v=3","gravatar_id":"","url":"https://api.github.com/users/paulpflug","html_url":"https://github.com/paulpflug","followers_url":"https://api.github.com/users/paulpflug/followers","following_url":"https://api.github.com/users/paulpflug/following{/other_user}","gists_url":"https://api.github.com/users/paulpflug/gists{/gist_id}","starred_url":"https://api.github.com/users/paulpflug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulpflug/subscriptions","organizations_url":"https://api.github.com/users/paulpflug/orgs","repos_url":"https://api.github.com/users/paulpflug/repos","events_url":"https://api.github.com/users/paulpflug/events{/privacy}","received_events_url":"https://api.github.com/users/paulpflug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-09T17:51:26Z","updated_at":"2016-02-14T16:03:18Z","closed_at":null,"body":"Currently I'm using `this.$root.constructor` within my component to get to `Vue`\r\n\r\nBut when using `vue-router`, `this.$root` is a `VueComponent `, so this doesn't work.  \r\n`Object.getPrototypeOf(Object.getPrototypeOf(this))` would work, but I don't really want to do that, for obvious reasons :smile:\r\n\r\nmaybe I can have `$Vue` refering to the main Vue object?"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/183908201","html_url":"https://github.com/vuejs/vue/issues/2339#issuecomment-183908201","issue_url":"https://api.github.com/repos/vuejs/vue/issues/2339","id":183908201,"user":{"login":"yyx990803","id":499550,"avatar_url":"https://avatars.githubusercontent.com/u/499550?v=3","gravatar_id":"","url":"https://api.github.com/users/yyx990803","html_url":"https://github.com/yyx990803","followers_url":"https://api.github.com/users/yyx990803/followers","following_url":"https://api.github.com/users/yyx990803/following{/other_user}","gists_url":"https://api.github.com/users/yyx990803/gists{/gist_id}","starred_url":"https://api.github.com/users/yyx990803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyx990803/subscriptions","organizations_url":"https://api.github.com/users/yyx990803/orgs","repos_url":"https://api.github.com/users/yyx990803/repos","events_url":"https://api.github.com/users/yyx990803/events{/privacy}","received_events_url":"https://api.github.com/users/yyx990803/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T16:03:18Z","updated_at":"2016-02-14T16:03:18Z","body":"Actually, the next version of vue-router will probably use a different api which uses a plain Vue instance as root. Together with Vuex it will look more like:\r\n\r\n``` js\r\nconst root = new Vue({\r\n  el: '#app',\r\n  store: vuexStoreInstance,\r\n  router: vueRouterInstance,\r\n  components: { App }\r\n})\r\n```"}}