【发布时间】:2020-01-14 00:14:30
【问题描述】:
我正在使用 Angular v5。
我有 home 组件和 home2 组件
路由设置:
{
path: "home",
component: homecomponent
},
{
path:"home2",
component: home2component
}
{
path:"**",
redirectTo:"/home",
pathMatch: "full"
}
我在重定向回主组件时遇到问题。 home 组件完成重新初始化。
如何管理 home 组件的状态?
【问题讨论】:
-
您不想重新初始化组件?
-
是的。我不想重新初始化
标签: javascript node.js angular typescript ecmascript-6