I have encountered a problem that has previously been discussed here, but none of the solutions seem to work for me. I recently incorporated this module into an existing project:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from '../BackOffice/components/dashboard.component';
const routes: Routes = [
{
path: '',
component: DashboardComponent,
pathMatch: 'full'
}];
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(routes)
],
declarations: [DashboardComponent]
})
export class LazyModule { }
In my app.module:
{ path: 'lazy', loadChildren: 'app/lazy/lazy.module#LazyModule' },
However, when running "npm start," it gets stuck at 70% completion: https://i.sstatic.net/daPgR.png
If I remove the module, everything builds correctly. Just wanted to mention that this is in Angular 4. Thank you.