{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/2496","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/2496/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/2496/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/2496/events","html_url":"https://github.com/angular/angular-cli/issues/2496","id":180840046,"number":2496,"title":"Lazy loading is not working","user":{"login":"areijngoudt","id":2329587,"avatar_url":"https://avatars.githubusercontent.com/u/2329587?v=3","gravatar_id":"","url":"https://api.github.com/users/areijngoudt","html_url":"https://github.com/areijngoudt","followers_url":"https://api.github.com/users/areijngoudt/followers","following_url":"https://api.github.com/users/areijngoudt/following{/other_user}","gists_url":"https://api.github.com/users/areijngoudt/gists{/gist_id}","starred_url":"https://api.github.com/users/areijngoudt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/areijngoudt/subscriptions","organizations_url":"https://api.github.com/users/areijngoudt/orgs","repos_url":"https://api.github.com/users/areijngoudt/repos","events_url":"https://api.github.com/users/areijngoudt/events{/privacy}","received_events_url":"https://api.github.com/users/areijngoudt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-10-04T09:04:11Z","updated_at":"2016-10-06T09:32:50Z","closed_at":null,"body":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\n> Mac OSX El Capitan\r\n\r\n### Versions.\r\nangular-cli: 1.0.0-beta.16\r\nnode: 5.7.1\r\nos: darwin x64\r\n\r\n### Repro steps.\r\n> Was this an app that wasn't created using the CLI? What change did you do on your code? etc.\r\nThe app was not created using the CLI. When upgrading to Angular 2 I choose to use the CLI as serving and building tool\r\n\r\n\r\nI have this route in my app.routing.ts:\r\n\r\n```\r\nconst ROUTES: Routes = [\r\n    { path: '', redirectTo: 'analyse', pathMatch: 'full' },\r\n    { path: 'annotate', component: AnnotateComponent },\r\n    { path: 'fraud', component: FraudComponent },\r\n    { path: 'info',  loadChildren: 'app/info/info.module#InfoModule'  },\r\n];```\r\n\r\nthe InfoModule should be loaded lazily when navigating to it's path. But even in de --prod build there's no seperate bundle. The InfoModule is still part of the main.bundle.js.\r\n\r\nNote that I'm still importing the InfoModule in the app.module.ts otherwise the info route does not work at all."},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/251912835","html_url":"https://github.com/angular/angular-cli/issues/2496#issuecomment-251912835","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/2496","id":251912835,"user":{"login":"Richard87","id":5749715,"avatar_url":"https://avatars.githubusercontent.com/u/5749715?v=3","gravatar_id":"","url":"https://api.github.com/users/Richard87","html_url":"https://github.com/Richard87","followers_url":"https://api.github.com/users/Richard87/followers","following_url":"https://api.github.com/users/Richard87/following{/other_user}","gists_url":"https://api.github.com/users/Richard87/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard87/subscriptions","organizations_url":"https://api.github.com/users/Richard87/orgs","repos_url":"https://api.github.com/users/Richard87/repos","events_url":"https://api.github.com/users/Richard87/events{/privacy}","received_events_url":"https://api.github.com/users/Richard87/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T09:32:50Z","updated_at":"2016-10-06T09:32:50Z","body":"Hmm, I think there are some strange \"residual\" files after I run `ng serve --prod`\r\n\r\nI was trying to clean up the project, so I deleted all `*.ngfactory.ts`-files, aaand angular stopped finding my dashboard module again (didn't complain about route or anything, just couldn't find the module).\r\n\r\nThen I added DashboardModule to AppModules imports, and ofcourse it works again.. BUT when I removed DashboardModule's import (both inside @NgModule and javascript `import {} from ...` it _still_ works.\r\n\r\nSo my conclusion is that _I am_ importing DashboardModule in some old files, and that's why it doesnt work, but when I clean out the build files, why doesn't angular find my DashboardModule?"}}
{"actor":{"display_login":"Richard87"}}