I found out you can't lazy load a dynamic component. With a normal component it started working. The problem was creating a separate module for the component. Added the child component to the parent module. Now, it is working as expected.