Router
Router is the same idea as routing, said from the service side. Inject Router and call this.router.navigate(['/marks', roll]). After login, navigate. After logout, navigate to /login.
ActivatedRoute is the current page. Router is the taxi. Don’t inject ActivatedRoute when you only need to navigate.
Trap: navigateByUrl('/marks?x=1') vs navigate with queryParams — know which one you used. Another trap: navigation inside a constructor before the view exists.
/login → LoginPage /marks → MarksPage /admin + CanActivate ** → NotFound (last)
Exam tip
navigate(['/marks', roll]) + why not constructor.