我已将路由器路径配置如下:
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 null
或this.router.navigate()
。
也许有人知道这是问题还是我做错了什么?