I'm currently using Angular (v4) to build a web app which is essentially a portfolio of work. Each entry into the portfolio will most likely require its own component. Here lies the issue, the number of entries in the portfolio can range into the hundreds and I don't want to add a component to the module every time a new component is created. A search revealed the following possibilities to address my issue:
I've had a look at lazy loading of modules:
Even dynamic loading of components:
Even this stack overflow question
All these solutions require the components to be present in the module.
I did however manage to find this plunker, which loads components based on a component name and path to the component as strings. This unfortunately, is based on a very young version of angular 2.
Ideally, it would be good to extract parameters from the URL which can then be used the load the required component and it's associated class. Would this be the best option? Similar to the solution is the above plunker but updated to angular 4?