Creating More Routes
Explore the process of creating additional routes in Angular by building components for about and contact pages, defining their routes, and properly registering their modules in the app. This lesson helps you manage routing to enable navigation between different pages in an Angular application.
We'll cover the following...
We'll cover the following...
Let’s do an exercise. We were able to create a routing module to load the HomeComponent to display the content for the home page. There are two other pages we’ll want to make routes for. They’re the about and contact pages. We’ve already taken the first steps by creating modules for each page. The next step is to create components and route them.
Try doing this exercise on your own. Here are the series of steps you’ll need to take to accomplish this:
- Create a component for the contact page.
- Define a new route in the
contactrouting module. - Import the