Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Angular 7 library lazy loading via router - AOT only Workaround

Notifications You must be signed in to change notification settings

klemenoslaj/angular-demo-lazy-route-libraries

Repository files navigation

⚠️⚠️⚠️
This is NOT the proposed solution to lazy load modules with Angular router! It is a demo for the Angular CLI issue mentioned further down in the README.
⚠️⚠️⚠️

Official workaround: angular/angular-cli#6373 (comment)

DemoLazyRouteComponents

A workaround example to lazy load Angular CLI libraries within Angular CLI applications.

For more info please read the comment in Angular CLI issue.

Run the application

Execute the following commands:

  • git clone git@github.com:klemenoslaj/angular-demo-lazy-route-libraries.git && cd angular-demo-lazy-route-libraries
  • npm install
  • ng build lazy-component
  • ng serve --aot (NOTE: the workaround only works with AOT enabled for now)

NOTE: if Angular CLI is not installed globally, run npm run ng instead of ng only.

About

Angular 7 library lazy loading via router - AOT only Workaround

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published