title: Angular 2: How to pass route parameters to subroute?
body: <p>Using Angular 2 rc.1 and TypeScript.  I'm having a lot of trouble passing routing parameters to my component when the component is loaded in a subroute. I use the <code>@angular/router-deprecated</code> package.</p>
  
  <p>In my <strong>root component</strong>, I configured the routes as such:</p>
  
  <pre><code>@RouteConfig([
    {path:'/top', name:'Top', component: EndPointComponent},
    {path:'/sub/...', name:'Sub', component: MiddleManComponent}
  ])
  </code></pre>
  
  <p>Here is the <strong>endpoint component</strong> where I attempt to read the parameters </p>
  
  <pre><code>import {Component} from '@angular/core';
  import {RouteParams} from '@angular/router-deprecated';
  @Component({
      template: 'Route Params: {{routeParams.params | json}}'
  })
  export class EndPointComponent{
      constructor(private routeParams:RouteParams){}
  }
  </code></pre>
  
  <p>Here is the <strong>middleman component</strong> with the subroute to EndPointComponent</p>
  
  <pre><code>import {Component} from '@angular/core';
  import {RouteConfig, ROUTER_DIRECTIVES} from '@angular/router-deprecated';
  import {EndPointComponent} from "./endpoint.component";
  
  @Component({
      directives: [ROUTER_DIRECTIVES]
      template: `&lt;router-outlet&gt;&lt;/router-outlet&gt;`
  })
  @RouteConfig([
      {path: '/end', name: 'End', component: EndPointComponent, useAsDefault: true}
  ])
  export class MiddleManComponent {}
  </code></pre>
  
  <p>The parameters can be successfully read from the <code>routeParams</code> object of <code>EndPointComponent</code> when the component is loaded from the top-level route (eg: the route named 'Top' in the root component).  However, the parameters are always empty when I navigate to <code>EndPointComponent</code> by going throug <code>MiddleManComponent</code> (eg: via the route named 'Sub' in the root component).</p>
  
  <p>Do children routers scrub the parameters from parents before resolving the routes? That doesn't make much sense so I bet I'm missing something. My question is simply: how do I pass route parameters to a subroute?</p>
  
  <p>PS: I tried to build a plunker to <a href="http://plnkr.co/edit/zlEPWs10ileV0XrlggyA" rel="noreferrer">demo this setup</a> but I gave up when I couldn't figure out why the application doesn't load.</p>