子路由之间的切换问题
来源:3-8 resolve守卫

鼠大人
2017-05-30
、
代码结构如图,我的mainComponent是一个插座,包括了contentComponent。contentComponent里面也有一个插座,这样构成了子路由。我的activity文件夹里面有两个组件,分别是activityManagerComponent和activityCreateComponent,在我的activityManagerComponent里面有一个按钮,我希望点击之后跳转到activityCreateComponent模板,这种需求要怎么实现?
相关代码如图。
写回答
1回答
-
JoJo
2017-05-31
{path: 'main', component: MainComponent, children: [
{path: 'content', component: ConetentComponent, childern: [
{path: 'activityManager', component: ActivityManagerComponent},
{path: 'activityCreate', component: ActivityCreateComponent},
]}
]}路由配置如上。供参考。
042017-05-31
相似问题