title: How to pass parameters to child router in Angular 2 for deep linking?
body: <p>Basically, if I have one component that signals a child routing component, like:</p>
  
  <pre><code>@RouteConfig([
      {
          path: '/users/...', //CHILD ROUTING COMPONENT
          name: 'Users',
          component: UsersComponent,
          useAsDefault: true
      }
  ])
  export class App {
     constructor(private _router: Router) {}
     ucFirst(str:string){
          var parts = str.split(' ');
           for(var i = 0, ilen = parts.length; i &lt; ilen; i++){
              parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);
           }
           return parts.join(' ');
       }
     ngOnInit() {
       //Handle deep links if exist
       var baseHref = document.getElementsByTagName('base')[0].href;
          var path = location.href.replace(baseHref, '');
  
           if(path.length){
               let slugs = path.split('/');
               for(let i = 0, ilen = slugs.length; i &lt; ilen; i++){
                  slugs[i] = this.ucFirst(slugs[i]);
               }
               this._router.navigate(slugs);
           }
       }
   }
  </code></pre>
  
  <p>And then the child router uses some kind of parameter in one of the paths, like:</p>
  
  <pre><code>@RouteConfig([{
      path: '/',
      name: 'UserList',
      component: UserListComponent,
      useAsDefault: true
  },{
      path: '/:id', 
      name: 'UserView', 
      component: UserViewComponent
  }])
  </code></pre>
  
  <p>How do I make deep links work?  I can use the code to get to the grandchild view, but deep links fail (Error No route 'users/1' where 1 is the :id).  Basically I need to handle half of the path in the parent router and half in the child router but I have not found the way to do so.  I can make deep links work as long as they exist completely in the parent but I am working on a larger project and want to make the set up more modular.</p>
  
  <p>I have put my code in this plunker: <a href="https://plnkr.co/edit/7cKBEwQmFSJrDFWhL4EV?p=preview" rel="nofollow">https://plnkr.co/edit/7cKBEwQmFSJrDFWhL4EV?p=preview</a>
  It works locally (minus the deep links) but not on plunker, which I've never used before so I imagine this is kind of simple configuration issue on my part.  But it at least gives you an idea of the attempt at modularization.</p>