{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/9870","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/9870/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/9870/comments","events_url":"https://api.github.com/repos/angular/angular/issues/9870/events","html_url":"https://github.com/angular/angular/issues/9870","id":164322344,"number":9870,"title":"Component Router does not work with Upgrade Adapter","user":{"login":"ptomaszi","id":19273934,"avatar_url":"https://avatars.githubusercontent.com/u/19273934?v=3","gravatar_id":"","url":"https://api.github.com/users/ptomaszi","html_url":"https://github.com/ptomaszi","followers_url":"https://api.github.com/users/ptomaszi/followers","following_url":"https://api.github.com/users/ptomaszi/following{/other_user}","gists_url":"https://api.github.com/users/ptomaszi/gists{/gist_id}","starred_url":"https://api.github.com/users/ptomaszi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptomaszi/subscriptions","organizations_url":"https://api.github.com/users/ptomaszi/orgs","repos_url":"https://api.github.com/users/ptomaszi/repos","events_url":"https://api.github.com/users/ptomaszi/events{/privacy}","received_events_url":"https://api.github.com/users/ptomaszi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20router","name":"comp: router","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-07T14:27:12Z","updated_at":"2016-07-25T10:05:06Z","closed_at":"2016-07-25T10:05:06Z","body":"When trying to use the Angular 2 Component Router (Angular 2 RC 4) with the upgrade adapter I got the following error:\r\n\r\n> Bootstrap at least one component before injecting Router. at setupRouter\r\n\r\nThis is my main.ts file:\r\n\r\n```\r\nangular.module(moduleName).directive('App', upgradeAdapter.downgradeNg2Component(AppComponent));\r\n\r\nupgradeAdapter.addProvider(APP_ROUTER_PROVIDERS);\r\n\r\nupgradeAdapter.bootstrap(document.body, [moduleName]);\r\n```\r\n\r\nI google the problem and found the following links, but they all correspond to the router deprecated module as the Angular team changed how the router works since RC4:\r\n\r\nhttps://github.com/angular/angular/issues/7147?_pjax=%23js-repo-pjax-container\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/234913139","html_url":"https://github.com/angular/angular/issues/9870#issuecomment-234913139","issue_url":"https://api.github.com/repos/angular/angular/issues/9870","id":234913139,"user":{"login":"ptomaszi","id":19273934,"avatar_url":"https://avatars.githubusercontent.com/u/19273934?v=3","gravatar_id":"","url":"https://api.github.com/users/ptomaszi","html_url":"https://github.com/ptomaszi","followers_url":"https://api.github.com/users/ptomaszi/followers","following_url":"https://api.github.com/users/ptomaszi/following{/other_user}","gists_url":"https://api.github.com/users/ptomaszi/gists{/gist_id}","starred_url":"https://api.github.com/users/ptomaszi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptomaszi/subscriptions","organizations_url":"https://api.github.com/users/ptomaszi/orgs","repos_url":"https://api.github.com/users/ptomaszi/repos","events_url":"https://api.github.com/users/ptomaszi/events{/privacy}","received_events_url":"https://api.github.com/users/ptomaszi/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T10:05:06Z","updated_at":"2016-07-25T10:05:06Z","body":"@brandonroberts your solution works as expected! Is the solution provided temporary or it will be the same approach for any further router releases?"}}
{"actor":{"display_login":"ptomaszi"}}