NGRX/router select parent route data

389 Views Asked by At

I want to get the route data for the parent route from the current route. Is it possible? The documentation here https://ngrx.io/guide/router-store/selectors shows only how to get the route data from the current route.

1

There are 1 best solutions below

0
timdeschryver On

You can enable the paramsInheritanceStrategy: 'always' option from the Angular Router.

https://timdeschryver.dev/blog/til-paramsinheritancestrategy-to-always-have-access-to-parent-route-info