In my angular application, back-end users can create custom templates. Those custom templates need to be loaded in the angular application at specific positions. I have a custom directive which gets templates
( based on the routes) from the CMS and inject it to my angular application. If I put it into the innerHTML
the components will not get rendered correctly. I need componentFactoryResolver
and compiler
to properly show the components.
The above solution does not work with AOT
compilation. Is there any other way I can achieve the same and make use of AOT
? Is server side rendering is only solution to this?