So, are you wondering how to start routing in Angular2? I am so glad you are here. This blog is going to be all about routing and navigation in Angular2. Routing and navigation is the core concept of Angular2 . Alright let’s dive into routing and navigation and take a close look at it.
Now, We will be discussing following points in this article.
1. Why routing is necessary
2. Define routes for pages
3. Link to Routes
4. Navigate from Code
5. Route Guards
6. Route Based Link Styling
7. Lazy Loading
8. Code Clean Up
Let’s discuss the above points one by one.
Why routing is necessary
Routing helps in directing users to different pages based on the option they choose on the main page. Hence, based on the option they choose, the required Angular Component will be rendered to the user.
Define routes for pages
View original post 1,020 more words