1

How can achieve the below using Angular 4 (cli + Webpack) :

  1. Compile and Bundle a custom module in its own file(s)
  2. Load this module at runtime via its URL

So basically the idea is to develop independent modules, but load them at runtime (not at build time). Very similar to what's done in here (https://eyalvardi.wordpress.com/2016/09/04/injecting-components-in-runtime/) but with Angular 4 and cli.

EDIT

This question is different from the other question (How to manually lazy load a module?) :

  1. We don't want to use the router in this scenario

  2. The modules to be loaded should be compiled independently (maybe in another project) AND aren't known beforehand they should be transpiled and placed on the server and fetch via their URL.

maximz101
  • 678
  • 1
  • 8
  • 20

0 Answers0