Angular 5 router.navigate does not work
问题 I'm trying to redirect a user to another page based on some condition. Here's my example login component: ngOnInit() { console.log(">>> router", this.router) console.log(">>> activatedRoute", this.activatedRoute) if (this.activatedRoute.queryParams['value'].param === 'value') { console.log(">>> redirecting") this.router.navigate(['home']); } } If I navigate to the login component without a parameter, then I'm shown the login component template, that's good. However, when I navigate to the