{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/763","repository_url":"https://api.github.com/repos/vuejs/vue-router","labels_url":"https://api.github.com/repos/vuejs/vue-router/issues/763/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/763/comments","events_url":"https://api.github.com/repos/vuejs/vue-router/issues/763/events","html_url":"https://github.com/vuejs/vue-router/issues/763","id":182553771,"number":763,"title":"Cannot use router-link in child components","user":{"login":"garedolori","id":9861295,"avatar_url":"https://avatars.githubusercontent.com/u/9861295?v=3","gravatar_id":"","url":"https://api.github.com/users/garedolori","html_url":"https://github.com/garedolori","followers_url":"https://api.github.com/users/garedolori/followers","following_url":"https://api.github.com/users/garedolori/following{/other_user}","gists_url":"https://api.github.com/users/garedolori/gists{/gist_id}","starred_url":"https://api.github.com/users/garedolori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garedolori/subscriptions","organizations_url":"https://api.github.com/users/garedolori/orgs","repos_url":"https://api.github.com/users/garedolori/repos","events_url":"https://api.github.com/users/garedolori/events{/privacy}","received_events_url":"https://api.github.com/users/garedolori/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vuejs/vue-router/labels/need%20repro","name":"need repro","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-12T15:16:50Z","updated_at":"2016-10-12T22:28:46Z","closed_at":"2016-10-12T22:28:46Z","body":"I'm trying to use VueRouter inside the .vue component and it gives me an error\r\n\r\n> [Vue warn]: Unknown custom element: <router-link> - did you register the component correctly? For recursive components, make sure to provide the \"name\" option. \r\n\r\nmy main.js file :\r\n````\r\n import Vue from 'vue/dist/vue'\r\nimport App from './App.vue'\r\nimport VueRouter from 'vue-router'\r\n\r\n//from Router.js\r\nimport router from './Router'\r\n\r\nVue.use(VueRouter);\r\n\r\nnew Vue({\r\n\t\t\trouter :router,\r\n\t\t\tcomponents : {App},\r\n\t\t\tel:\"#app\"\r\n\t\t})\r\n```\r\n\r\n\r\nmy Router.js file : \r\n\r\n```\r\nimport Vue from 'vue/dist/vue'\r\nimport VueRouter from 'vue-router'\r\n\r\nVue.use(VueRouter);\r\n\r\n//Foo component contains <router-link> in it's template and it gives me warning\r\nimport Foo from './components/Foo.vue'\r\n\r\n//inside this template router-link works fine\r\nconst Bar = {template : `<div>I'm a bar the route is {{route}}<br /><router-link to=\"/\">Home</router-link></div>`}\r\n\r\nconst routes = [\r\n    {\r\n        path : '/foo',\r\n        component : Foo\r\n    },\r\n    {\r\n        path : '/',\r\n        component : Hello\r\n    },\r\n    {\r\n        path : '/bar',\r\n        component : Bar\r\n    }\r\n];\r\n\r\nconst Router = new VueRouter({routes});\r\nexport default Router;\r\n```\r\nmy App.vue file : \r\n```\r\n<template>\r\n\t<div class=\"app\">\r\n\t    <router-link to=\"/\"> Hello </router-link>\r\n\t    <router-link to=\"/foo\"> Foo </router-link>\r\n    </div>\r\n</template>\r\n\r\n<script>\r\n\texport default {}\r\n</script>\r\n```\r\n\r\nand my index.html file : \r\n```\r\n<div id=\"app\">\r\n        <app></app>\r\n        <router-view></router-view>\r\n</div>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/comments/253358304","html_url":"https://github.com/vuejs/vue-router/issues/763#issuecomment-253358304","issue_url":"https://api.github.com/repos/vuejs/vue-router/issues/763","id":253358304,"user":{"login":"LinusBorg","id":1444526,"avatar_url":"https://avatars.githubusercontent.com/u/1444526?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T22:28:46Z","updated_at":"2016-10-12T22:28:46Z","body":"`import Vue from 'vue/dist/vue'\r\n\r\nThis is your problem. \r\n\r\nhttp://vuejs.org/guide/installation.html#Standalone-vs-Runtime-only-Build\r\n\r\nFurther support via forum.vuejs.org"}}
{"actor":{"display_login":"LinusBorg"}}