May 20, 2022
But you're making an implicit association with the "viewedit" route inside the AppComponent, and you're reinventing the wheel instead of using the convenience of Route Guard, plus your logic that decides when to activate the route is leaked into the AppComponent.
Mate, I don't want to say that you are bad, I just want to show you a more appropriate and convenient way to solve this problem.