Thank you very much for the greate article! I am using your code for creating dynamic component on the fly. But unfortunately when I do import RouterModule it does silently stop showing dynamic components content.

const tmpModule = NgModule({
declarations: [tmpCmp],
imports: [BrowserModule, RouterModule]
})(class {});

Without RouterModule it works fine. Did you have any successfull experience using RouterModule with dynamic component? Need me to create stackoverflow?

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade