0
我订阅我的顶部导航栏中,组件的路由器事件:导航到router.events函数中另一条路线导致浏览器挂断
this.router.events.subscribe(event => {
if (event instanceof RoutesRecognized && this.authService.isLoggedIn()) {
// some other custom if-logic then do this:
this.router.navigate(['404']);
}
});
当我执行上面的代码我的浏览器冻结,我要杀死在任务管理器的chrome.exe ...
为什么我不能导航到另一个新的路线,而老路线仍然是导航?
我该怎么做?
感谢您的提示是正确的。我不会修复这个错误。其他一些问题,问题只是由于这是我给自己定下的要求,但我选用彻底改变我的初始化界面,从而不再需要的这种worksaround :-) – Pascal