Angular 2" @ angular / router":" 3.0.0-alpha.6"

时间:2016-06-17 14:38:37

标签: angular typescript

我已将路由器路径配置如下:

export const ROUTER_CONFIG: RouterConfig = [{
  path: '/',
  component: QtHomePageComponent,
}, {
  path: '/account',
  component: QtAccountPageComponent,
  children: [{
    path: '/dashboard',
    component: QtDashboardPageComponent,
  }],
}, {
  path: '/user',
  component: QtUserPageComponent,
  children: [{
    path: '/signin',
    component: QtUserSigninPageComponent,
  }, {
    path: '/signup',
    component: QtUserSignupPageComponent,
  }],
}];

每个&#34;父母&#34;组件包含主<router-outlet>

当我从/导航到/user/signin/user/signin/user/signup时,一切正常,但是当我试图访问{{ 1}}来自/account/dashboard或任何已更改的路径&#34; parent&#34;容器与/user/signup崩溃,并不重要browser_adapter.js:77 EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property '_routeConfig' of nullthis.router.navigate()

也许有人知道这是问题还是我做错了什么?

完整来源:https://github.com/rtbm/ng2-app/tree/master/src

0 个答案:

没有答案