{"action":"closed","issue":{"url":"https://api.github.com/repos/yyx990803/vue/issues/1257","labels_url":"https://api.github.com/repos/yyx990803/vue/issues/1257/labels{/name}","comments_url":"https://api.github.com/repos/yyx990803/vue/issues/1257/comments","events_url":"https://api.github.com/repos/yyx990803/vue/issues/1257/events","html_url":"https://github.com/yyx990803/vue/issues/1257","id":105012525,"number":1257,"title":"Component's won't work if registered after Vue bootstraping","user":{"login":"fnlctrl","id":5557143,"avatar_url":"https://avatars.githubusercontent.com/u/5557143?v=3","gravatar_id":"","url":"https://api.github.com/users/fnlctrl","html_url":"https://github.com/fnlctrl","followers_url":"https://api.github.com/users/fnlctrl/followers","following_url":"https://api.github.com/users/fnlctrl/following{/other_user}","gists_url":"https://api.github.com/users/fnlctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/fnlctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnlctrl/subscriptions","organizations_url":"https://api.github.com/users/fnlctrl/orgs","repos_url":"https://api.github.com/users/fnlctrl/repos","events_url":"https://api.github.com/users/fnlctrl/events{/privacy}","received_events_url":"https://api.github.com/users/fnlctrl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-05T08:04:47Z","updated_at":"2015-09-05T09:52:38Z","closed_at":"2015-09-05T09:52:38Z","body":"Took me one hour to figure out that this:\r\n```javascript\r\nvar vm = new Vue({\r\n     el: 'body'\r\n})\r\nVue.component('my-component', {\r\n  template: '<p>A custom component!</p>'\r\n})\r\n```\r\n```html\r\n<body>\r\n    <my-component></my-component>\r\n</body>\r\n```\r\n\r\nwill not work because Vue is bootstrapped before component registration.\r\n\r\nI'm migrating from angular.js, and this really seems weird because we used to bootstrap the framework first and let it register directives by itself afterwards.\r\n\r\nIf it's intended behavior, it should at least be mentioned in the [Guide](http://vuejs.org/guide/components.html), but I don't see anything covering this important information at all."}}