Angular how to get the non activated children routes

522 Views Asked by At

In Angular you can always inject ActivatedRoute in your component to get a reference to the current activated route.

It has a property children which:

Contains all the child routes activated under the current route.

I was wondering how can I get all the children routes (so also the non activated ones).

1

There are 1 best solutions below

0
On

You could use route.routeConfig.children to get the children defined in the router.