title: Can you use @ViewChild() or similar with a router-outlet? How if so?
body: <p>I repeatedly run into a situation where I'd like to access a child component existing on the other side of a router outlet rather than a selector:</p>
  
  <pre><code>Like:
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  
  NOT:
  &lt;selector-name&gt;&lt;/selector-name&gt;
  </code></pre>
  
  <p>This conflicts with the ViewChild functionality as I know it, yet it seems like my component should be able to see and interact with what's inside that router-outlet just as easily as with what's inside a selector-tag.</p>
  
  <p>For instance I tried this:</p>
  
  <pre><code>export class RequestItemCatsComp {
      @ViewChild('child') child: RequestItemsComp;
      ***etc...***
  ngAfterViewInit() {
      if (this.child) // Always child is undefined
          this.groupId = this.child.groupId;
      }
  }
  </code></pre>
  
  <p>But naturally, <strong>child is undefined</strong> because this is the wrong way. Is there a right way?</p>
  
  <p>I'm trying to use a service to share the data but then run into another problem "expression has changed after it was checked" which I'm hoping to remedy without a hack or enabling prod mode.</p>