Lazy loaded modules - luftsport/nlf-client GitHub Wiki

lazy-routing.module.ts

{ path: 'lazy', loadChildren: () => import('app/lazy/lazy.module').then(m => m.NlfLazyModule), data: { bc: 'Lazy', preload: false, title: 'Lazy', prod: true } },

lazy.module.ts

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NlfSharedModule } from 'app/nlf-shared.module';
import { LazyComponent } from './lazy.component';


@NgModule({
  declarations: [
    LazyComponent
  ],
  imports: [
    CommonModule,
    NlfSharedModule,
    ...

  ]
})

lazy-routing.module.ts