Angular 停止 Router NavigationStart
Angular stop Router NavigationStart
是否可以在 Angular 中停止 NavigationStart?如果用户尝试更改路线,我会尝试提示自定义确认模式。
constructor(private router: Router) {
if(val instanceof NavigationStart){
//prompt the confirmation modal and stop NavigationStart or at least
make it wait until user performs any action
}
}
您可以防止路由被解析为 CanActivate or CanDeactive class
是否可以在 Angular 中停止 NavigationStart?如果用户尝试更改路线,我会尝试提示自定义确认模式。
constructor(private router: Router) {
if(val instanceof NavigationStart){
//prompt the confirmation modal and stop NavigationStart or at least
make it wait until user performs any action
}
}
您可以防止路由被解析为 CanActivate or CanDeactive class