Custom component routes with inner child routes

In the preceding example, when the user clicks on product links, the user is navigated to a new path. In this example, you will learn how to create custom components and child routes and display the view inside the same path; that is, inner child routes.

Extending the same example, take a look at the application navigation plan:

Let's start by defining the route definitions in the service.routes.ts file. Refer to the following code for route definitions:

import { Routes } from '@angular/router';import { ServicesComponent } from './services.component';import { ServicesChildComponent } from "./services-child.component"; ...

Get Expert Angular now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.