Stayed Informed – Angular 2, 4, 5, 6 and 7 documentations including Examples
What is Angular Router?
What is Angular Router?
An Angular Router is a tool, library that configures navigations between states and views within your Angular app.
The Routing library is written and maintained by the Angular Core Team.
Angular router has own library package - @angular/router.
import {Routes, RouterModule,} from '@angular/router';
The basic concept of Angular Router and It allows you to -
1. Redirect a URL to another URL
2. Resolve data before a page is displayed
3. Run scripts when a page is activated or deactivated
4. Lazy load parts of our application
The router supports both styles with two LocationStrategy providers -
1. PathLocationStrategy— this is the default style.
2. HashLocationStrategy— adds the route path to the hash (#) in the browser’s URL.
What is Router module?
The Router module is a module that provides the necessary service providers and directives for navigating one view to other in the application.
For
more detail kindly refer the link - https://www.code-sample.com/2018/05/angular-5-6-7-routing-and-navigation.html