👉

Did you like how we did? Rate your experience!

Rated 4.5 out of 5 stars by our customers 561

Award-winning PDF software

review-platform review-platform review-platform review-platform review-platform

Video instructions and help with filling out and completing Can Form 8655 Modules

Instructions and Help about Can Form 8655 Modules

This is part 33 of angular 6 tutorial. In this video, we'll discuss creating a separate routing module for a feature module. Along the way, we'll also discuss the difference between router module for route and for chain methods. At the moment, all our application level routes, which are home, empty path, and wildcard routes, and the employee feature routes, which are list, create, and edit, are present in this one application level routing module, "app routing module". Now, here is what we want to do for separation of concerns and ease of maintenance. We want to include only the application level routes in this "app routing module". The rest of the routes, which are related to our employee feature, we want to move them to a separate feature routing module. We'll place that feature routing module file in our employee folder and name it "employee-routing.module.ts". Before we write any code, let's quickly understand the standard naming convention used to name these feature routing modules. In this case, we are creating a routing module for the employee feature, so we prefix the feature name, which is "employee". And because this is a routing module, we append "-routing.module". Similarly, if we were creating a routing module for a login feature, the file name would be "login-routing.module". And the class name in this file would be "login-routing.module". The code in this file is going to be very similar to what we already have in the "app routing module". So let's make a copy of this and then change the parts that are required. First, let's change the name of the class from "AppRoutingModule" to "EmployeeRoutingModule". Let's move it to the top of the file. We need "NgModule", so let's leave it there. We also need "RouterModule" and "Routes" types, so let's leave...