title: Angular2 check/detect ng-content select exist from parent node *ngIf statement
body: <p>My question is about checking that <code>&lt;some_selector&gt;</code> connected with <code>&lt;ng-content select='some_selector'&gt;</code> was given or not in parent component. May be I give example for clarify:</p>
  
  <p>We have parent component template (editor.html):</p>
  
  <p>Here is my editor</p>
  
  <pre><code>&lt;modal&gt;
      Some contents
      &lt;mfoot&gt;&lt;button calss='btn' (click)="close()"&gt;Close&lt;/button&gt;&lt;/mfoot&gt;
  &lt;/modal&gt;
  </code></pre>
  
  <p>And in modal component template (modal.html) we want to use such *ngIf statement:</p>
  
  <pre><code>&lt;div class="modal&gt;
      &lt;div class="modal-body"&gt;
          &lt;ng-content&gt;&lt;/ng-content&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer" *ngIf='hasNgContent("mfoot")' &gt;
          &lt;ng-content select="mfoot"&gt;&lt;/ng-content&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>We want to not show div.modal-footer if <code>&lt;mfoot&gt;</code> tag was nod used in editor template inside <code>&lt;modal&gt;</code> tag. So how to implement <code>hasNgContent()</code> method? or may be in angular2 there is more direct <code>*ngIf</code> statement that allow detect that <code>&lt;mfoot&gt;</code> tag was used in parent component  tag or not.</p>