title: Problems using ng-content through components in Angular
body: <p>I have the following problem, I need to be able to pass code from a file where a component is used to its child component. I was thinking about doing the following approach with ng-content, but this solution doesn't work for me. I'm not sure if the way to use the ng-content is correct or I have a bug passing the information to the selects.</p>
  <p>I would like to set out how I had intended to carry out this logic and I would like someone to point out what might be going wrong or an alternative to this.</p>
  <p>file1.html:</p>
  <pre><code>&lt;father-component&gt;
  &lt;div content1&gt;
      &lt;div contentChild1 *ngIf=&quot;condition&quot;&gt;&lt;/div&gt;
      &lt;div contentChild2 *ngIf=&quot;condition2&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/father-component&gt;
  </code></pre>
  <p>father-component.html:</p>
  <pre><code>&lt;son&gt;
  &lt;ng-content select=&quot;[content1]&quot;
  &lt;/son&gt;
  </code></pre>
  <p>son.html</p>
  <pre><code>&lt;div select=&quot;[contentChild1]&quot; *ngIf=&quot;condition3&quot;&gt;&lt;/div&gt;
  &lt;div select=&quot;[contentChild2]&quot; *ngIf=&quot;condition4&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Thank you very much for your attention and best regards!</p>