Opening and loading the NG2 Cli module

Im begins to develop the front end for a fully modular backend (Vertxles docker cluster).

The main idea / problem is to have a basic ng2 application that defines the dashboard, sidemenu, other basic components and connects to the backend, discovering which modules are included, through some manifest list containing the path for the required JS files / packages , the modules must be completely independent, something that you could download from github and put in a folder.

So far, the closest I have found this question: Angular2: dynamically loads modules from a given folder , which show how to load modules at runtime, but I have not found a way to develop and build packages myself.

Is it possible? Can you guys point me in the right direction? Did I miss any example of this?

+4
source share
2 answers

If you intend to use the Angular CLI for this, instead of folding your own assembly, all routes should be defined up.

All you can do is install all the modules - these are the lazy loadable modules of the router (with load-children, and then to protect them from the router, depending on what the control panel says.

0
source

, , , github/npm, .

, . , , , .

, , , , . , forRoot() , , , .

0

Source: https://habr.com/ru/post/1668319/


All Articles