title: Insert a template to child component in angular 6
body: <p>In this case, the app-child can not be changed, which means you can only operate the app-parent. My opinion is finding a way to insert the template in app-child, is there a function which like <code>Renderer2.insert(parent, newItem, childRef)</code> or another solution ?</p>
  
  <p>Look at <a href="https://stackblitz.com/edit/insert-template-to-child-component?file=src%2Fapp%2Fparent%2Fparent.component.html" rel="noreferrer">https://stackblitz.com/edit/insert-template-to-child-component</a> for detail.</p>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;app-parent&gt;
    &lt;ng-template #childTemplate&gt;
      how to insert this template in app-child
    &lt;/ng-template&gt;
  &lt;/app-parent&gt;
  </code></pre>
  
  <p><strong>parent.component.html</strong></p>
  
  <pre><code>&lt;app-child&gt;
    &lt;!-- &lt;ng-template #childTemplate&gt;
      this is work, but I need to input the template in app-parent content
    &lt;/ng-template&gt; --&gt;
  &lt;/app-child&gt;
  </code></pre>
  
  <p><strong>child.component.html</strong></p>
  
  <pre><code>&lt;ng-container [ngTemplateOutlet]="childTemplate"&gt;&lt;/ng-container&gt;
  </code></pre>