Im starting to develop a front end for a completely modular backend (a vertx verticles docker cluster).
The main idea/problem is to have a base ng2 application that defines a dashboard, sidemenu, other base components, and connects to the backend discovering which modules are enabled, via some kind of list of manifests containing the the path for the required JS files/bundles, the modules should be completely independent, something that you would be able to download from github and place in a folder.
So far the closest thing I've found was this question, Angular2: Loading modules dynamically from a given folder, that show how to load modules in runtime, but I hanven't found a way to develop and build the bundles independently.
Is this even possible? Can you guys point me in the right direction? Have I missed any example of this?
If you are going for Angular CLI for this instead of rolling your own build, all the routes have to be defined up-front.
What you can do though is set all modules are lazy loaded router modules (using load-children
, and then have router guards for loading them depending on what dashboard says for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With