In Angular, Route Guards are interfaces that tell the router whether or not it should allow navigation to a specifically requested route. This decision is made by looking for a true or false value returned from a class implementing the given guard interface.

There are five different types of Route Guards in Angular and each of them is called in a particular sequence. The router’s behavior is altered as per the use of the specific guard. The guards:

  • CanActivate
  • CanActivateChild
  • CanDeactivate
  • CanLoad
  • Resolve
BY Best Interview Question ON 25 Feb 2020