{"action":"created","issue":{"url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/15","repository_url":"https://api.github.com/repos/websanova/vue-jwt-auth","labels_url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/15/comments","events_url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/15/events","html_url":"https://github.com/websanova/vue-jwt-auth/issues/15","id":175503921,"number":15,"title":"Vue 2.0","user":{"login":"lamberski","id":166641,"avatar_url":"https://avatars.githubusercontent.com/u/166641?v=3","gravatar_id":"","url":"https://api.github.com/users/lamberski","html_url":"https://github.com/lamberski","followers_url":"https://api.github.com/users/lamberski/followers","following_url":"https://api.github.com/users/lamberski/following{/other_user}","gists_url":"https://api.github.com/users/lamberski/gists{/gist_id}","starred_url":"https://api.github.com/users/lamberski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamberski/subscriptions","organizations_url":"https://api.github.com/users/lamberski/orgs","repos_url":"https://api.github.com/users/lamberski/repos","events_url":"https://api.github.com/users/lamberski/events{/privacy}","received_events_url":"https://api.github.com/users/lamberski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-07T13:35:17Z","updated_at":"2016-09-07T15:35:30Z","closed_at":null,"body":"Hi Rob,\r\n\r\nDoes `vue-jwt-auth` work with Vue 2.0? I've been trying to make it work but without any luck.\r\n\r\n> Uncaught TypeError: Cannot read property 'router' of undefined\r\n\r\nAbove error is displayed when I run below code:\r\n\r\n```javascript\r\nimport Vue from 'vue/dist/vue'\r\nimport VueRouter from 'vue-router'\r\nimport VueResource from 'vue-resource'\r\nimport VueAuth from 'vue-jwt-auth'\r\n\r\nVue.use(VueRouter)\r\nVue.use(VueResource)\r\n\r\nvar router = new VueRouter({\r\n    mode: 'history',\r\n    routes: [\r\n        {\r\n            path: '/',\r\n            name: 'home',\r\n            auth: true,\r\n            component: require('./pages/Home.vue')\r\n        },\r\n        {\r\n            path: '/login',\r\n            name: 'login',\r\n            component: require('./pages/Login.vue')\r\n        }\r\n    ]\r\n})\r\n\r\nVue.use(VueAuth, {}, router)\r\n\r\nconst app = new Vue({\r\n    router,\r\n    template: `<router-view></router-view>`\r\n}).$mount('#app')\r\n```"},"comment":{"url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/comments/245320528","html_url":"https://github.com/websanova/vue-jwt-auth/issues/15#issuecomment-245320528","issue_url":"https://api.github.com/repos/websanova/vue-jwt-auth/issues/15","id":245320528,"user":{"login":"websanova","id":1645771,"avatar_url":"https://avatars.githubusercontent.com/u/1645771?v=3","gravatar_id":"","url":"https://api.github.com/users/websanova","html_url":"https://github.com/websanova","followers_url":"https://api.github.com/users/websanova/followers","following_url":"https://api.github.com/users/websanova/following{/other_user}","gists_url":"https://api.github.com/users/websanova/gists{/gist_id}","starred_url":"https://api.github.com/users/websanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/websanova/subscriptions","organizations_url":"https://api.github.com/users/websanova/orgs","repos_url":"https://api.github.com/users/websanova/repos","events_url":"https://api.github.com/users/websanova/events{/privacy}","received_events_url":"https://api.github.com/users/websanova/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T15:35:29Z","updated_at":"2016-09-07T15:35:29Z","body":"Haven't tested it yet so no idea. But I'm currently in the middle of an\noverhaul which will support all versions much easier.\n\nHopefully early next week it will be out.\n\nRob\n\nOn Sep 7, 2016 09:35, \"Maciek Lamberski\" <notifications@github.com> wrote:\n\n> Hi Rob,\n>\n> Does vue-jwt-auth work with Vue 2.0? I've been trying to make it work but\n> without any luck.\n>\n> Uncaught TypeError: Cannot read property 'router' of undefined\n>\n> Above error is displayed when I run below code:\n>\n> import Vue from 'vue/dist/vue'import VueRouter from 'vue-router'import VueResource from 'vue-resource'import VueAuth from 'vue-jwt-auth'\n> Vue.use(VueRouter)Vue.use(VueResource)\n> var router = new VueRouter({\n>     mode: 'history',\n>     routes: [\n>         {\n>             path: '/',\n>             name: 'home',\n>             auth: true,\n>             component: require('./pages/Home.vue')\n>         },\n>         {\n>             path: '/login',\n>             name: 'login',\n>             component: require('./pages/Login.vue')\n>         }\n>     ]\n> })\n> Vue.use(VueAuth, {}, router)\n> const app = new Vue({\n>     router,\n>     template: `<router-view></router-view>`\n> }).$mount('#app')\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/websanova/vue-jwt-auth/issues/15>, or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABkcy8xjKD_6hhBcKOpad8b_AbN2UQkrks5qnr2cgaJpZM4J27KI>\n> .\n>\n"}}
{"actor":{"display_login":"websanova"}}