Create many very similar (lazy loaded) functional modules without rewriting a lot of code in Angular 2

I want to write an application with many subpages in Angular, which should have the same structure and their own routing:

./subpage1/topicA
./subpage1/topicB
./subpage1/topicC
...
./subpage2/topicA
./subpage2/topicB
./subpage2/topicC
...

      

Since there will be many such subpages, and some might be relatively large, I want to package everyone into a lazy loaded function module to reduce load times.

My main goal is to make the whole structure as light and comfortable as possible. For example, I don't want to rewrite the routing and other underlying structures for each subpage, and I want to be able to change stuff (such as general structure or subroutine names) without touching each subpage module. Is there a way to do this?

+3


source to share





All Articles