This course has been updated! We now recommend you take the Angular 13 Fundamentals course.

Check out a free preview of the full Angular 9 Fundamentals course:
The "Create a Route Solution" Lesson is part of the full, Angular 9 Fundamentals course featured in this preview video. Here's what you'd learn in this lesson:

Lukas live codes the solution to the create a route exercise.

Get Unlimited Access Now

Transcript from the "Create a Route Solution" Lesson

[00:00:00]
>> Welcome back. Let's go ahead and see the solution for this challenge. So the first thing I'm gonna do is I'm going to hop into the CLI and let's go with NGGC and I believe I said users, and as always I like to do a dry run. So you can see here that because we have two modules in our route, we have to be a little bit more specific.

[00:00:38] Now let's give this another spin. Very good. All right, run this without the flag. All right, let's hop into our code, and let us wire this up. So we go into our app routing module. We're going to add in a route for our user. So, path component. Users component.

[00:01:25] We'll clean this up. There we go. And so not too hard, so far, pretty straightforward. And then let's go into our app component dot Ts. Let me just duplicate this line. And we're going to go users and I'm going to guess here. And assume that there is an icon called user.

[00:01:49] If not, I will come back and fix that. All right? So quite possibly in just a matter of moments, we may have completed this challenge, let's go here. No, no icon. Let me check here. We go to app component. What do we use up here? Person. All right.

[00:02:14] Not a problem. We'll just reuse the one from the logout button, back into our code, there we go. So we're at home and now we are on user, active courses, user, and then login. And so there you have it. Angular rehtoric fundamentals. This is the crux of what you're going to use in most of your day to day work and I think the Angular team has done a really good job of really kind of streamlining a lot of this to wire up.

[00:02:51] And I really enjoy or I use quite a bit the lazy loading module mechanism to streamline application, really the performance for the user. So I think they did a really good job because that didn't exist for a long time and now it does and you saw that it was not too cumbersome to hook that up, so