Angular Routing Basics
The browser is a familiar model of application navigation:
- Enter a URL in the address bar and the browser navigates to a corresponding page.
- Click links on the page and the browser navigates to a new page.
- Click the browser’s back and forward buttons and the browser navigates backward and forward through the history of pages you’ve seen.
Every time a link is clicked or the browser URL changes, Angular router makes sure your application reacts accordingly.
To accomplish that, Angular router performs the following 7 steps in order:
Parse: it parses the browser URL the user wants to navigate to
Redirect: it applies a URL redirect (if one is defined)
Identify: it identifies which router state corresponds to the URL
Guard: it runs the guards that are defined in the router state
Resolve: it resolves the required data for the router state
Activate: it activates the Angular components to display the page
Manage: it manages navigation and repeats the process when a new URL is requested
IT Professionals, Web Developers, web programmers, IT students can Apply for the certification course and get ahead.