Sunil23391 / angular-library-routing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠️⚠️⚠️
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


Languages

Language:TypeScript 77.1%Language:JavaScript 20.5%Language:HTML 1.9%Language:CSS 0.4%