Skip to content
Loading modules from server (lazy loading) with Angular
TypeScript JavaScript CSS HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
projects
server
.editorconfig
.gitignore
.nvmrc
README.md
angular.json
demo-preview.png
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

Angular - Loading modules from server (lazy loading)

This project demonstrates several ways to load multiple modules.

  • One way is to load lazy modules via the router.
  • Another way is to create an custom elements bundle and load it via script element: <script type=module src="http://...>"

The state (store) / context is shared between modules and application.

Preview

This project was generated with Angular CLI version 9.0.0-rc.5.

Prerequesits

  • Node V. 10.13.x or later
  • Angular CLI 9.0.0-rc.5

Start

  1. Clone this repository

  2. npm i to intall all needed modules.

  3. npm start to start the demo.

    • creates an production build of reporting (custom elements bundle) and copies it to the server/module/reporting Folder.
    • starts the mock api server to provide modules information and reporting bundle
    • starts the demo app

There you go: demo runs at localhost:4200

You can’t perform that action at this time.