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?

3
  • If the template needs to be loaded dynamically, then by definition it cannot work with AOT Commented Jul 23, 2018 at 15:21
  • Possible duplicate of Angular2, evaluate template from string inside a component Commented Jul 23, 2018 at 15:28
  • that post doesn't help me too much, I want to make a dynamic server side rendering for SEO. Commented Jul 25, 2018 at 7:23

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.