There is a lot of confusion on this topic because there are so many different ways to do it.

Here are the appropriate types used in the following screen shots:

  • private route: ActivatedRoute
  • private router: Router

Methods