{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/10472","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/10472/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/10472/comments","events_url":"https://api.github.com/repos/angular/angular/issues/10472/events","html_url":"https://github.com/angular/angular/issues/10472","id":169178160,"number":10472,"title":"feat(NgModule) consider removing the need to list every routing-component in declarations","user":{"login":"choeller","id":423277,"avatar_url":"https://avatars.githubusercontent.com/u/423277?v=3","gravatar_id":"","url":"https://api.github.com/users/choeller","html_url":"https://github.com/choeller","followers_url":"https://api.github.com/users/choeller/followers","following_url":"https://api.github.com/users/choeller/following{/other_user}","gists_url":"https://api.github.com/users/choeller/gists{/gist_id}","starred_url":"https://api.github.com/users/choeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choeller/subscriptions","organizations_url":"https://api.github.com/users/choeller/orgs","repos_url":"https://api.github.com/users/choeller/repos","events_url":"https://api.github.com/users/choeller/events{/privacy}","received_events_url":"https://api.github.com/users/choeller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-03T16:43:27Z","updated_at":"2016-08-10T09:55:12Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[ ] bug report\r\n[x] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\n\r\nBefore `NgModules` I only had to import my routes in the routes config:\r\n\r\n```ts\r\nimport {DashboardComponent} from \"./dashboard/dashboard.component\";\r\nimport {SettingsComponent} from \"./settings/settings.component\";\r\nimport {AboutComponent} from \"./about/about.component\";\r\nimport {LoginComponent,LoginGuard,UserResolver} from \"./login/index\";\r\nimport {NotFoundComponent} from \"./not-found/not-found.component\";\r\nimport {TasksComponent} from './tasks/tasks.component';\r\n\r\nexport const APP_ROUTES: Routes = [\r\n  {path: '', component: DashboardComponent}, \r\n  {path: 'settings', component: SettingsComponent}, \r\n  {path: 'about', component: AboutComponent}\r\n];\r\n```\r\n\r\nafter upgrading to NgModule I need to import this whole list once again in my bootstrap-file / MainModule:\r\n```ts\r\nimport {DashboardComponent} from \"./dashboard/dashboard.component\";\r\nimport {SettingsComponent} from \"./settings/settings.component\";\r\nimport {AboutComponent} from \"./about/about.component\";\r\nimport {LoginComponent,LoginGuard,UserResolver} from \"./login/index\";\r\nimport {NotFoundComponent} from \"./not-found/not-found.component\";\r\nimport {TasksComponent} from './tasks/tasks.component';\r\n\r\n@NgModule({\r\n  imports: [BrowserModule, FormsModule, RouterModule.forRoot(APP_ROUTES)],\r\n  entryComponents: [AppComponent],\r\n  declarations: [DashboardComponent, SettingsComponent,  AboutComponent, LoginComponent, NotFoundComponent, TasksComponent ],\r\n  bootstrap: [AppComponent]\r\n})\r\nclass MainModule {\r\n}\r\n```\r\nThis is quite a lot of copy paste...\r\n\r\n**Expected/desired behavior**\r\n\r\nI would assume, that when I pass the routing-config to the RouterModule, it should be possible for Angular to add the Routing-Components (like `DashboardComponent`) automatically to the module. \r\n\r\nWhereas for other Directives the NgModule-approach means less work, for Routing-Components it currently means more work than before. So it would be cool to reduce the need of copy-pasting here.\r\n\r\n**Please tell us about your environment:**\r\n\r\n* **Angular version:** 8efbcc996a0f9582387ee3c78dc1c54d5bed9c51\r\n \r\n* **Browser:** [all ] \r\n \r\n* **Language:** [all] \r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/238820077","html_url":"https://github.com/angular/angular/issues/10472#issuecomment-238820077","issue_url":"https://api.github.com/repos/angular/angular/issues/10472","id":238820077,"user":{"login":"damiandennis","id":1276622,"avatar_url":"https://avatars.githubusercontent.com/u/1276622?v=3","gravatar_id":"","url":"https://api.github.com/users/damiandennis","html_url":"https://github.com/damiandennis","followers_url":"https://api.github.com/users/damiandennis/followers","following_url":"https://api.github.com/users/damiandennis/following{/other_user}","gists_url":"https://api.github.com/users/damiandennis/gists{/gist_id}","starred_url":"https://api.github.com/users/damiandennis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiandennis/subscriptions","organizations_url":"https://api.github.com/users/damiandennis/orgs","repos_url":"https://api.github.com/users/damiandennis/repos","events_url":"https://api.github.com/users/damiandennis/events{/privacy}","received_events_url":"https://api.github.com/users/damiandennis/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T09:55:12Z","updated_at":"2016-08-10T09:55:12Z","body":"@choeller I hope that is not the case. That will be a huge change and tons of refactoring.... I thought RC was meant to be fairly stable."}}
{"actor":{"display_login":"damiandennis"}}