title: How to get active child route in parent component Angular 2
body: <p>I want to check the active child route in parent component but I don't know how to get this. I am trying to use <code>ActivatedRoute</code> but not able to get it.</p>
  
  <p>I have tried both of the answers from <a href="https://stackoverflow.com/questions/38672432/angular2-rc4-check-active-child-route-in-parent-component?noredirect=1&amp;lq=1">Angular2 (rc4) - Check active child route in parent component</a>:</p>
  
  <ol>
  <li><p>I have tried the accepted answer:</p>
  
  <pre><code>constructor(
      private router:Router,
      private route: ActivatedRoute
   ) {
       var state = this.router.routerState
       var children = state.children(this.route)
   }
  </code></pre>
  
  <p>With this I am getting this error:</p>
  
  <pre><code>Property 'children' does not exist on type 'RouterState'
  </code></pre></li>
  <li><p>I have tried with this one as well: </p>
  
  <pre><code>this.router.events.filter(evt =&gt; evt instanceof NavigationEnd)
     .map(evt =&gt; evt.url)
     .subscribe(url =&gt; console.log(url));
  </code></pre>
  
  <p>but getting these error with this one:</p>
  
  <pre><code>property 'url' does not exist on type 'Event'
  property 'url' does not exist on type 'RouteConfigLoadStart'`
  </code></pre></li>
  </ol>
  
  <p>Any idea?</p>