Angular Router

What is Angular Router and Router module?

Stayed Informed – Angular 2, 4, 5, 6 and 7 documentations including Examples

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 {RoutesRouterModule,}  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.


Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog -
My Books - Book 1 and Book 2

What is Angular Router and Router module? What is Angular Router and Router module? Reviewed by Anil Singh on 3:17 AM Rating: (5) Powered by Blogger.