Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

What is Routing in Angular 2?

Angular2 Routing provides us to navigation and URLs manipulation capabilities.

This post helps us to learn Application “Routings” in Angular 2.

In the below routing example I am using Angular 2 for the client side and ASP.NET Core with single page application (SPA) for the server application.

“The Router is use to map applications URLs to application components. There are three main components that you are using to configure routing.”
1.     Routes: - It uses to describe our application's Routes.
2.     Router Imports: - It uses to import our application's Routes.
3.     RouterOutlet: - It is a placeholder component and use to get expanded to each route's content.
4.     RouterLink: - It is use to link to application's routes.

All above directives are provided by the Angular RouterModule package.

Angular2 - Routing Concepts

What is Routing in Angular 2? What is Routes?
What is Router Imports? What is RouterOutlet?
Is it possible to have a multiple router-outlet in the same template? What is RouterLink?



This post first appeared on Programming, please read the originial post: here

Share the post

What is Routing in Angular 2?

×

Subscribe to Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×