Questions tagged [angular-router-loader]
11 questions
16
votes
2 answers
Replace chunk name with module name in angular 4 lazy loading
I'm using angular-cli-1.6.3 for bundling my project.
I try to rename lazy loaded chunk name into valid module name. But it is not working. Code snippet given below,
{
path: 'lazy',
loadChildren: './lazy/module#LazyModule?chunkName=LazyModule'
}

Srigar
- 1,648
- 3
- 14
- 28
9
votes
8 answers
Angular 5 lazy loading Error: Cannot find module
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…

Luciano
- 450
- 1
- 7
- 17
3
votes
1 answer
Angular default path for an outlet
Given the following module, how can I create the routes so that when the application loads this module it will route to CComponent and have the AComponent loaded in the named router outlet search-results
app.module.ts
import { BrowserModule } from…

peinearydevelopment
- 11,042
- 5
- 48
- 76
2
votes
0 answers
Angular 5 webpack angular-router-loader not working and no errors
I'm facing an issue after angular 5 migration with lazy loading. In my webpack.config I'm using angular-router-loader but there is no error in console when I'm running in JIT mode and lazy modules never load.
When I run the app with ngTools for AOT…

Emmanuel Mendoza
- 21
- 1
1
vote
0 answers
Lazy loading modules with angular-router-loader errors with cannot find module "."
Webpack has trouble finding a module that I am trying to lazy load with angular-router-loader.
I am using the following:
Webpack 2.2.1
Angular 5.2
angular-router-loader 0.8.2
Installed the angular-router-loader via npm, and added the loader to my…

Glenster
- 1,187
- 2
- 13
- 31
1
vote
1 answer
Angular4. How to declare components/import modules for lazy loaded submodules?
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'
}
{
…

Andrey Ponomarenko
- 553
- 7
- 20
0
votes
1 answer
Lazy Loading ngModules with own routes
I have this scenario.
I have two Angular Modules: AuthModule and DashModule. Each of these modules have their own .routing.tsfiles.
Then, each of the modules are imported into the AppModule at the appwide level.
In code, here:
auth.module.ts is at…

KhoPhi
- 9,660
- 17
- 77
- 128
0
votes
1 answer
login component is taking to much time to load initially in angular 4
As you see, you have 5 in main module.In there when try to load login it is taking 14 seconds to load .I think login component is waiting for fulllayout component.
Could anyone please advice,if i have handled lazy loading properly.if not how to do…

pinku4132
- 61
- 5
0
votes
1 answer
Whether Angular ui-router support different master layout pages(new Html Page) from nested view
Today I have created a ThemeForest like a website with angular and mvc , So I have a login page, it will load the Dashboard page, In the dashboard page have lots of icons, So i click the Icons , it will load the complete different layout page…

Mohamed Sahir
- 2,482
- 8
- 40
- 71
0
votes
1 answer
Angular not able to navigate to child route
I am not able to go directly to the child route. my url is http://localhost:4201/home/profile but the router tracing starts with url: '/home’ instead of url: ‘/home/profile'
Router Event: NavigationStart platform-browser.es5.js:1028
…

Bhaskar
- 127
- 1
- 18
0
votes
2 answers
How to loadChildren async with angular-router-loader
I have folder structure like:
- app
-core
-vacancy
in core folder I have app.routing.ts where I would like to async add route to vacancy.
I did it like:
export const routing = RouterModule.forRoot([
{
path: '',
…

Andurit
- 5,612
- 14
- 69
- 121