title: @ContentChildren is not being populated
body: <p>I have three components: App, Parent, and Child:</p>
  
  <p><strong>App Component</strong></p>
  
  
  
  <pre class="lang-ts prettyprint-override"><code>@Component({
      selector: 'app',
      directives: [Parent,Child],
      template: '&lt;parent&gt;&lt;child&gt;hi&lt;/child&gt;&lt;child&gt;there&lt;/child&gt;&lt;/parent&gt;'
  })
  export class AppComponent {
      constructor() {
      }
  }
  </code></pre>
  
  <p><strong>Parent Component</strong></p>
  
  <pre class="lang-ts prettyprint-override"><code>@Component({
      selector: 'parent',
      template: '&lt;div&gt;&lt;h1&gt;Parent&lt;/h1&gt;&lt;ng-content&gt;&lt;/ng-content&gt;&lt;/div&gt;'
  })
  export class Parent {
      @ContentChildren(Child) children: QueryList&lt;Child&gt;;
      ngAfterContentInit() {
          console.log(this.children);
      }
  }
  </code></pre>
  
  <p><strong>Child Component</strong></p>
  
  <pre class="lang-ts prettyprint-override"><code>@Component({
      selector: 'child',
      template: '&lt;div&gt;&lt;h1&gt;Child&lt;/h1&gt;&lt;/div&gt;'
  })
  export class Child {
  }
  </code></pre>
  
  <p>As you can see in the Parent component, I've tried to use <code>@ContentChildren</code> to get the list of Child components, using the <code>Child</code> type as a selector.  However, this does not seem to work - the content children list is always undefined.   </p>
  
  <p>In the <code>ngAfterContentInit()</code> method, I would have expected content children to be populated.</p>
  
  <p>Am I missing something? </p>
  
  <p><strong>[Update]</strong></p>
  
  <p>So it turns out that the problem exists when all three components are in the same file (see console debug window where I output the content children):</p>
  
  <p><a href="http://plnkr.co/edit/57GCqrsO8xC5gntvDuxd?p=preview" rel="noreferrer">Plnkr Demo of Issue</a></p>
  
  <p>If they are in separate files the problem goes away:</p>
  
  <p><a href="http://plnkr.co/edit/jEwtG5jFbeId0D5RWLrf?p=preview" rel="noreferrer">Plnkr Demo Working</a></p>
  
  <p>Normally, I would only place all the components in the same file for learning purposes.  But it has me curious. Does anyone know why the behaviour is different?</p>