This example provides a look at Angular routing and the role it plays loading components.
-
Open
src/app/app.component.ts
and complete the TODO to add<router-outlet>
. -
Open
src/app/app-routing.module.ts
and complete the TODO tasks. -
Open
src/app/app.module.ts
and complete the TODO tasks. -
Open
src/app/customers/customers.component.html
and complete the TODO task. -
Open
src/app/orders/orders.component.ts
and complete the TODO task. -
You should see different customers displayed. Click on a customer's
View Orders
link to navigate to the orders route.