title: can I use ng template for a separate component and use its template reference in other html?
body: <p>I am trying to use ng-template for a html which is a separate component ,and I am trying to use its reference in other html.. Is it possible? If so I have tried the below ways and would like to understand what is that I am going wrong with?</p>
  
  <p>ng-template.html</p>
  
  <pre><code>&lt;ng-template #sample1&gt;  
    &lt;p&gt;ng template content&lt;/p&gt;
  &lt;/ng-template&gt;
  </code></pre>
  
  <p>display-template.html</p>
  
  <pre><code>&lt;div *ngIf="found;"&gt;
    &lt;ng-container *ngTemplateOutlet="sample1"&gt;&lt;/ng-container&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>DisplayTemplateComponent.ts</p>
  
  <pre><code>export class DisplayTemplateComponent   {
      @ViewChild('sample1', {static: false}) sample1: ElementRef;
      found = true;
  }
  </code></pre>