我想在 URL 更改时获取路由
https://localhost:3200
至
https://localhotst:3200/login
当路线发生变化时如何登录我尝试了 ActivateRoute 但我制作的代码不起作用
这是我尝试过的:
route.params.pipe(
takeUntil(this.destroy)
).subscribe(params => {
if (this.currentDialog) {
this.currentDialog.close();
}
this.currentDialog = matDialog.open(DialogComponent, {
data: { tabvalue, param.id}
}); //this is the code i took from a web site but i don't know how to apply it
});
在 param.id 中,id 是一个变量,但我不想使用它。我只想要 path: 'login', component: NavbarComponent } someting like this path