Explain how component routing works in Angular.

devquora
devquora

Posted On: Jun 28, 2021

 

The component routing works in Angular as whenever a user navigates to a page, Angular Router performs the following steps in order:

  • it reads the browser URL the user wants to navigate to
  • it applies a URL redirect (if one is defined)
  • it figures out which router state corresponds to the URL
  • it runs the guards that are defined in the router state
  • it resolves the required data for the router state
  • it activates the Angular components to display the page
  • it manages navigation and repeats the steps above when a new page is requested.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions