【发布时间】:2018-04-30 16:21:31
【问题描述】:
我的项目中有两个布局。一个是Basiclayout,另一个是Locationlayout。当用户第一次访问网站时,他是在 Basiclayout 中,但是当他给出他的位置时,布局将是 Locationlayout。如何根据这种情况在我的 app-routing.module.ts 文件中重定向?
我的 app-routing.module.ts 的代码 sn-p:-
const routes: Routes = [
{
path: '',
component: BasiclayoutComponent,
children: [
{ path: '', component: HomeComponent },
]
},
{
path: '',
component: LocationlayoutComponent,
children: [
{ path: '', component: HomeComponent },
]
}
];
【问题讨论】:
-
谁能给我一个建议?