title: Creating dynamic angular 8 components and html element and rearranging them
body: <p>I have the following problem. I have an array with angular 8 component names and html elements. Currently it is creating the angular 8 components and the html elements but does not arrange them like they are sorted in the array. 
  This is my code:</p>
  
  <pre><code>for (var i = 0; i &lt; res.length; i++) {
              var val = res[i];
              if (val.value.Type) {
                  //Getting the factory for the component
                  const factories = Array.from(this.resolver['_factories'].keys());
                  const factoryClass = &lt;Type&lt;any&gt;&gt;factories.find((x: any) =&gt; x.name === val.editor.alias);
  
                  const factory = this.resolver.resolveComponentFactory(factoryClass);
                  //Creating the component
                  this.Container.createComponent(factory);
              } else {
                  this.$Element.append(val.value);
              }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/z3eem.png" rel="nofollow noreferrer">My DOM looks the following</a></p>
  
  <p>The angular components always get inserted directly after the .content div. I already tried using Container.insert but it does not work either. </p>