我在我的应用程序中使用Angular 7。在用户注册后,用户将在该邮件后端团队中收到一封邮件,提供一些动态url。如下所示
https://csrt.minn.ai/api/users/authenticate/9a4c790a-9a33-4d54-961a-683e144e4669那么如何为动态url提供组件呢?
发布于 2021-03-01 13:47:51
您可以使用通配符路由将身份验证的所有子路由重定向到routing.module中的特定路由,例如:
var routes: Routes = [
{
path: "",
children: [
{
path: "authenticate",
children: [
{
path: "someWhere", // or "" to root route of authentication
component: AuthenticateComponent
},
{
path: "**",
redirectTo: ""
}
]
}
]
}
]https://stackoverflow.com/questions/66408042
复制相似问题