In Angular, during each navigation route, the Router sends navigation events through the Router Events property.

Here is the list of events range from when the navigation starts and ends too many points in between.

  • NavigationStart
  • RouteConfigLoadEnd
  • GuardsCheckStart
  • ActivationStart
  • GuardsCheckEnd
  • ResolveStart
  • ActivationEnd
  • NavigationEnd
BY Best Interview Question ON 15 Apr 2020

Example

export class AppComponent {
   constructor(private router: Router) {
   }
   ngOnInit() {
      this.router.events
      .pipe(filter(event => event instanceof NavigationEnd))
      .subscribe(() => {
         ...
       });
   }
}