From the course: Building Angular and ASP.NET Web API Apps
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Configuring routing in Angular
From the course: Building Angular and ASP.NET Web API Apps
Configuring routing in Angular
- [Instructor] To be able to navigate between different components in Angular, we need to configure routing and navigation. And to do so, we are first going to import all the necessary libraries, then we are going to configure routing, and at the end we are going to see how we can use the router outlet tag. So, let's get started. Inside the App folder, I'm going to create a new TypeScript file. I'm going to name this file app-router.module.ts. First thing first, let us import all the necessary modules. So I'm just going to write in here import then I will import the RouterModule and the Routes. We can import them both from the Angular/router library so add Angular/router. So we have the libraries. Next let us import the components because in a router, you need to configure all the components to which or from which you can navigate. So let us write in here components and then import our first component which is the Entries component. So import EntriesComponent from .entries/entries…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Adding a component3m 8s
-
(Locked)
Adding a service2m 55s
-
(Locked)
Configuring routing in Angular6m 51s
-
(Locked)
Requesting data from Web API7m 29s
-
(Locked)
Designing a view with Material Design5m 26s
-
(Locked)
Creating a Material Design table5m 30s
-
(Locked)
Showing data to the users4m 8s
-
(Locked)
-
-
-
-
-
-