{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/23412","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/23412/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/23412/comments","events_url":"https://api.github.com/repos/angular/angular/issues/23412/events","html_url":"https://github.com/angular/angular/issues/23412","id":314979212,"node_id":"MDU6SXNzdWUzMTQ5NzkyMTI=","number":23412,"title":"Angular5.x lazyLoad problem, undefined is not a function","user":{"login":"liugang1988","id":11206849,"node_id":"MDQ6VXNlcjExMjA2ODQ5","avatar_url":"https://avatars1.githubusercontent.com/u/11206849?v=4","gravatar_id":"","url":"https://api.github.com/users/liugang1988","html_url":"https://github.com/liugang1988","followers_url":"https://api.github.com/users/liugang1988/followers","following_url":"https://api.github.com/users/liugang1988/following{/other_user}","gists_url":"https://api.github.com/users/liugang1988/gists{/gist_id}","starred_url":"https://api.github.com/users/liugang1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liugang1988/subscriptions","organizations_url":"https://api.github.com/users/liugang1988/orgs","repos_url":"https://api.github.com/users/liugang1988/repos","events_url":"https://api.github.com/users/liugang1988/events{/privacy}","received_events_url":"https://api.github.com/users/liugang1988/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-17T09:32:39Z","updated_at":"2018-11-20T01:55:37Z","closed_at":"2018-04-17T20:16:50Z","author_association":"NONE","body":"when I update the angular version form 4.x to 5.x, tell me the error:\r\n<pre>\r\ncore.js:1449 ERROR Error: Uncaught (in promise): TypeError: undefined is not a function\r\nTypeError: undefined is not a function\r\n    at Array.map (<anonymous>)\r\n    at webpackAsyncContext (eval at ./src/$$_lazy_route_resource lazy recursive (main.bundle.js:formatted:17), <anonymous>:657:34)\r\n    at SystemJsNgModuleLoader.loadAndCompile (core.js:6570)\r\n    at SystemJsNgModuleLoader.load (core.js:6554)\r\n    at RouterConfigLoader.loadModuleFactory (router.js:4595)\r\n    at RouterConfigLoader.load (router.js:4575)\r\n    at MergeMapSubscriber.eval [as project] (router.js:2061)\r\n    at MergeMapSubscriber._tryNext (mergeMap.js:128)\r\n    at MergeMapSubscriber._next (mergeMap.js:118)\r\n    at MergeMapSubscriber.Subscriber.next (Subscriber.js:95)\r\n    at Array.map (<anonymous>)\r\n    at webpackAsyncContext (eval at ./src/$$_lazy_route_resource lazy recursive (main.bundle.js:formatted:17), <anonymous>:657:34)\r\n    at SystemJsNgModuleLoader.loadAndCompile (core.js:6570)\r\n    at SystemJsNgModuleLoader.load (core.js:6554)\r\n    at RouterConfigLoader.loadModuleFactory (router.js:4595)\r\n    at RouterConfigLoader.load (router.js:4575)\r\n    at MergeMapSubscriber.eval [as project] (router.js:2061)\r\n    at MergeMapSubscriber._tryNext (mergeMap.js:128)\r\n    at MergeMapSubscriber._next (mergeMap.js:118)\r\n    at MergeMapSubscriber.Subscriber.next (Subscriber.js:95)\r\n    at resolvePromise (zone.js:814)\r\n    at resolvePromise (zone.js:771)\r\n    at eval (zone.js:873)\r\n    at ZoneDelegate.invokeTask (zone.js:421)\r\n    at Object.onInvokeTask (core.js:4751)\r\n    at ZoneDelegate.invokeTask (zone.js:420)\r\n    at Zone.runTask (zone.js:188)\r\n    at drainMicroTaskQueue (zone.js:595)\r\n    at <anonymous>\r\n</pre>\r\nmy code: \r\n<pre>\r\nimport {ModuleWithProviders} from '@angular/core';\r\nimport {Routes, RouterModule} from '@angular/router';\r\nimport {RbacService} from './rbac/rbac.service';\r\nconst routes: Routes = [\r\n  {\r\n    path: '',\r\n    redirectTo: '/page/index/main',\r\n    pathMatch: 'full'\r\n  },\r\n  {\r\n    path: 'page',\r\n    component: MitLayoutComponent,\r\n    canActivate: [RbacService],\r\n    children: [\r\n      {path: 'index', \r\n      loadChildren: 'app/modules/index/index.module#IndexModule', \r\n     canActivate: [RbacService]}, \r\n    ];\r\n   export const AppRoutes: ModuleWithProviders = RouterModule.forRoot(routes, {useHash: true});\r\n</pre>\r\n<pre>\r\nAngular CLI: 1.7.4\r\nNode: 8.9.4\r\nOS: win32 x64\r\nAngular: 5.2.10\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, platform-browser, platform-browser-dynamic, router\r\n\r\n@angular/cli: 1.7.4\r\n@angular-devkit/build-optimizer: 0.3.2\r\n@angular-devkit/core: 0.4.9\r\n@angular-devkit/schematics: 0.3.2\r\n@ngtools/json-schema: 1.2.0\r\n@ngtools/webpack: 1.10.2\r\n@schematics/angular: 0.3.2\r\n@schematics/package-update: 0.3.2\r\ntypescript: 2.4.2\r\nwebpack: 3.11.0\r\n</pre>\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/440108198","html_url":"https://github.com/angular/angular/issues/23412#issuecomment-440108198","issue_url":"https://api.github.com/repos/angular/angular/issues/23412","id":440108198,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDEwODE5OA==","user":{"login":"Herwt-liyj","id":10431528,"node_id":"MDQ6VXNlcjEwNDMxNTI4","avatar_url":"https://avatars3.githubusercontent.com/u/10431528?v=4","gravatar_id":"","url":"https://api.github.com/users/Herwt-liyj","html_url":"https://github.com/Herwt-liyj","followers_url":"https://api.github.com/users/Herwt-liyj/followers","following_url":"https://api.github.com/users/Herwt-liyj/following{/other_user}","gists_url":"https://api.github.com/users/Herwt-liyj/gists{/gist_id}","starred_url":"https://api.github.com/users/Herwt-liyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Herwt-liyj/subscriptions","organizations_url":"https://api.github.com/users/Herwt-liyj/orgs","repos_url":"https://api.github.com/users/Herwt-liyj/repos","events_url":"https://api.github.com/users/Herwt-liyj/events{/privacy}","received_events_url":"https://api.github.com/users/Herwt-liyj/received_events","type":"User","site_admin":false},"created_at":"2018-11-20T01:55:37Z","updated_at":"2018-11-20T01:55:37Z","author_association":"NONE","body":"thanks"}}
{"actor":{"display_login":"Herwt-liyj"}}