angular-router-loader

Angular 5 lazy loading Error: Cannot find module

无人久伴 提交于 2019-12-18 16:58:40
问题 I would like to use lazy loading but I can not understand why it does not work, it gives me error "Cannot find module". This is my environment: - Angular 5.2.1 - .NET Core 2 - Webpack 3.10.0 - angular-router-loader 0.8.2 - @angular/cli 1.6.5 I tried different path in loadChildren always without success, i also temporarily disabled all the guards and the children routing. What did I do wrong? FOLDERS ClientApp app components users users-routing.module.ts users.module.ts app-routing.module.ts

Angular4. How to declare components/import modules for lazy loaded submodules?

痴心易碎 提交于 2019-12-11 06:27:58
问题 For now for each rout of my app I am loading exact module. Here is how I am doing that : const routes: Routes = [ { path: '', loadChildren: './pages/site-index/site-index-routing.module#SiteIndexRoutingModule' } { path: 'account', loadChildren: './pages/site-account/site-account-routing.module#SiteAccountRoutingModule' } ]; If I declare the following components : HeaderComponent, MenuComponent, FooterComponent in app.module.ts like that : const BASE_COMPONENTS: any[] = [ HeaderComponent,

Angular 5 lazy loading Error: Cannot find module

孤街浪徒 提交于 2019-11-30 15:10:01
I would like to use lazy loading but I can not understand why it does not work, it gives me error "Cannot find module". This is my environment: - Angular 5.2.1 - .NET Core 2 - Webpack 3.10.0 - angular-router-loader 0.8.2 - @angular/cli 1.6.5 I tried different path in loadChildren always without success, i also temporarily disabled all the guards and the children routing. What did I do wrong? FOLDERS ClientApp app components users users-routing.module.ts users.module.ts app-routing.module.ts app.module.shared.ts app-routing.module.ts const appRoutes: Routes = [ { path: 'users', loadChildren: '.