Thanks to this very insightful post I am able to create components on the fly with a dynamic template fetched from an endpoint, however these components are compiled at runtime using the RuntimeCompiler, which is disabled when using AoT compilation, AKA when in production.
Is anyone aware of a similr solution that works with AoT?
My requirements are:
- fetch the component's template at runtime
- store some data from a endpoint into a property of the component
- have Angular parse the template, especially the contained bindings that work on the property containing data from the endpoint