title: Angular2 child routes not working
body: <p>I'm using @angular rc4 <code>"@angular/router": "^3.0.0-beta.2"</code></p>
  
  <p>I haven't been able to get child routes work, when i start adding child routes i get many kinds of errors: 
  Here's my route code: </p>
  
  <pre><code>{ path: '', redirectTo: 'parentComp'},
  { path: 'parentComp', component: parentContainer, 
          children: [
              {path: 'componenta', component: ComponentA }
          ]
      }
  </code></pre>
  
  <blockquote>
    <p>EXCEPTION: Error during instantiation of
    Router!.BrowserDomAdapter.logError @
    browser_adapter.js:84BrowserDomAdapter.logGroup @
    browser_adapter.js:94ExceptionHandler.call @
    exception_handler.js:65(anonymous function) @
    application_ref.js:337schedulerFn @
    async.js:139SafeSubscriber.__tryOrUnsub @
    Subscriber.js:223SafeSubscriber.next @
    Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @
    Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @
    async.js:127onError @ ng_zone.js:124onHandleError @
    ng_zone_impl.js:74ZoneDelegate.handleError @ zone.js:327Zone.runTask @
    zone.js:259ZoneTask.invoke @ zone.js:423 browser_adapter.js:84
    ORIGINAL EXCEPTION: Error: Invalid route configuration of route
    '{path: "", redirectTo: "activity"}': please provide 'pathMatch'. The
    default value of 'pathMatch' is 'prefix', but often the intent is to
    use 'full'.BrowserDomAdapter.logError @
    browser_adapter.js:84ExceptionHandler.call @
    exception_handler.js:74(anonymous function) @
    application_ref.js:337schedulerFn @
    async.js:139SafeSubscriber.__tryOrUnsub @
    Subscriber.js:223SafeSubscriber.next @
    Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @
    Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @
    async.js:127onError @ ng_zone.js:124onHandleError @
    ng_zone_impl.js:74ZoneDelegate.handleError @ zone.js:327Zone.runTask @
    zone.js:259ZoneTask.invoke @ zone.js:423 browser_adapter.js:84
    ORIGINAL STACKTRACE:BrowserDomAdapter.logError @
    browser_adapter.js:84ExceptionHandler.call @
    exception_handler.js:77(anonymous function) @
    application_ref.js:337schedulerFn @
    async.js:139SafeSubscriber.__tryOrUnsub @
    Subscriber.js:223SafeSubscriber.next @
    Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @
    Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @
    async.js:127onError @ ng_zone.js:124onHandleError @
    ng_zone_impl.js:74ZoneDelegate.handleError @ zone.js:327Zone.runTask @
    zone.js:259ZoneTask.invoke @ zone.js:423</p>
  </blockquote>
  
  <p>So i add the pathMatch: </p>
  
  <pre><code>{ path: '', redirectTo: 'parentComp', pathMatch: 'full'},
  { path: 'parentComp', component: ActivityContainer, 
      children: [
          {path: 'componenta', component: ComponentA }
      ]
  }
  </code></pre>
  
  <p>Here's the error I get: </p>
  
  <blockquote>
    <p>app/bootstrapper.routes.ts(5,7): error TS2322: Type '({ path: string;
    redirectTo: string; pathMatch: string; } | { path: string; component:
    typeof pare...' is not assignable to type 'Route[]'.   Type '{ path:
    string; redirectTo: string; pathMatch: string; } | { path: string;
    component: typeof paren...' is not assignable to type 'Route'.</p>
  </blockquote>
  
  <p>I realized that many of the answers written were about making sure to use the right version, but I'm using the right latest one for routes just as in angular.io 
  So I also have router-deprecated along with it to decrease the number of errors that appear but still, I wasn't able to get the child routes working. </p>
  
  <p>I'm having my shell which will load in its router-outlet the routes, but the minute i go to child routes nothing work. 
  Help appreciated. </p>
  
  <p>Thanks </p>