Title: ngtools with nested lazy modules routing · Issue #3593 · angular/angular-cli · GitHub
Open Graph Title: ngtools with nested lazy modules routing · Issue #3593 · angular/angular-cli
X Title: ngtools with nested lazy modules routing · Issue #3593 · angular/angular-cli
Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.22-1 node: 6.7.0 os: win32 x64 Repro steps. Suppose there are two nested lazy modules routes like this: Module A: app-routing.module `expo...
Open Graph Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.22-1 node: 6.7.0 os: win32 x64 Repro steps. Suppose there are two nested lazy modules routes like ...
X Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.22-1 node: 6.7.0 os: win32 x64 Repro steps. Suppose there are two nested lazy modules routes like ...
Opengraph URL: https://github.com/angular/angular-cli/issues/3593
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ngtools with nested lazy modules routing","articleBody":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\n> Windows 10\r\n\r\n\r\n### Versions.\r\n> angular-cli: 1.0.0-beta.22-1\r\nnode: 6.7.0\r\nos: win32 x64\r\n\r\n\r\n### Repro steps.\r\nSuppose there are two nested lazy modules routes like this:\r\n\r\n**Module A: app-routing.module**\r\n\r\n`export const routes: Routes = [\r\n { path: '', redirectTo: 'dashboard', pathMatch: 'full' },\r\n { path: 'login', loadChildren: './login/login.module#LoginModule' },\r\n { path: 'dashboard', loadChildren: './dashboard/dashboard.module#DashboardModule'}\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forRoot(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AppRoutingModule {}`\r\n\r\n\r\n**Module B (lazy module with another lazy module) dashboard-routing.module:**\r\n\r\n`const routes: Routes = [\r\n { path: '', component: DashboardComponent, pathMatch: 'full' },\r\n { path: 'explotaciones', component: DashboardComponent,\r\n children: [\r\n { path: '', loadChildren: './explotaciones/explotaciones.module#ExplotacionesModule'}\r\n ]\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class DashboardRoutingModule {}`\r\n\r\n\r\n### The log given by the failure.\r\nError: Could not resolve route \"./explotaciones/explotaciones.module#ExplotacionesModule\" from file \"D:\\Code\\DL-GEST\\src\\client\\app\\dashboard\\dashboard.module\".\r\n at D:\\Code\\DL-GEST\\node_modules\\@ngtools\\webpack\\src\\plugin.js:280:23\r\n at Array.map (native)\r\n at AotPlugin._processNgModule (D:\\Code\\DL-GEST\\node_modules\\@ngtools\\webpack\\src\\plugin.js:275:14)\r\n at _loop_1 (D:\\Code\\DL-GEST\\node_modules\\@ngtools\\webpack\\src\\plugin.js:309:35)\r\n at AotPlugin._processNgModule (D:\\Code\\DL-GEST\\node_modules\\@ngtools\\webpack\\src\\plugin.js:328:13)\r\n at D:\\Code\\DL-GEST\\node_modules\\@ngtools\\webpack\\src\\plugin.js:242:39\r\n at process._tickCallback (internal/process/next_tick.js:103:7)\r\n 70% building modules 716/716 modules 0 active\r\n\r\n\r\n### Mention any other details that might be useful.\r\nI have been looking for the error and I find a problem in plugin.js. At line 274, this.extractLoading function use a variable called 'relativeModulePath'. With module A, this variable use '/' on paths (D:/Code/DL-GEST/src/client/app/app.module) and there is no problem with it, but with module B, this variable use '\\\\' on path and then, emit error I wrote lines before.\r\n\r\nI have changed function `var relativeModulePath = this._resolveModulePath(module, containingFile)` to\r\n`var relativeModulePath = this._resolveModulePath(module, containingFile).replace(/\\\\/g,'/')` and it solves my problems.\r\n\r\nIs there a better approach to solve it??\r\n\r\nThanks and excuse my english :). \r\n> ---------------------------------------------------------------\r\n> Thanks! We'll be in touch soon.\r\n","author":{"url":"https://github.com/jmpmscorp","@type":"Person","name":"jmpmscorp"},"datePublished":"2016-12-16T06:42:01Z","url":"https://github.com/angular/angular-cli/issues/3593"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2e934e56-4c18-4fe9-c279-def711e033f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E52C:EA09B:171A3BF:1E99988:6B013E59 |
| html-safe-nonce | 77000a3b078634602d87f2451fbf33ba665d0321443c3f1a56b94081ae7c502a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTJDOkVBMDlCOjE3MUEzQkY6MUU5OTk4ODo2QjAxM0U1OSIsInZpc2l0b3JfaWQiOiIzOTY5MTI1MDA4MjY5MTk2ODg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 46cfdd03c736e22225c0c8a056e5a49efc24c55dd606f52f2cfe112a62116818 |
| hovercard-subject-tag | issue:195991916 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/3593/issue_layout |
| twitter:image | https://opengraph.githubassets.com/26d1bbfb683ee703f77ea0dd52775b9221afdd1c946aec03fe5ae72f904baf84/angular/angular-cli/issues/3593 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/26d1bbfb683ee703f77ea0dd52775b9221afdd1c946aec03fe5ae72f904baf84/angular/angular-cli/issues/3593 |
| og:image:alt | Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.22-1 node: 6.7.0 os: win32 x64 Repro steps. Suppose there are two nested lazy modules routes like ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jmpmscorp |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width