2

I would like to load a custom Component with the Template defined from a repository. This template html contains the tags of the components. Example:

<div data-id='main-container' class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    <div class="row">
        <app-controls-list></app-controls-list>

    </div>

    <div class="row">

    <app-controls-categories-list></app-controls-categories-list>

    </div>

    <div class="row">

     <app-controls-edit></app-controls-edit>

    </div>

  </div>

The main goal is to insert the HTML into a component and then activate the creation of the components inside (appcontrols-categories-list, app-controls-edit, app-controls-list). It has to work with AOT (for SSR). Is it possible?

cristinao6
  • 39
  • 1
  • If the template needs to be loaded dynamically, then by definition it cannot work with AOT – user184994 Jul 23 '18 at 15:21
  • Possible duplicate of [Angular2, evaluate template from string inside a component](https://stackoverflow.com/questions/44077994/angular2-evaluate-template-from-string-inside-a-component) – Reactgular Jul 23 '18 at 15:28
  • that post doesn't help me too much, I want to make a dynamic server side rendering for SEO. – cristinao6 Jul 25 '18 at 07:23

0 Answers0