DEV Community

Cover image for How to Access Angular Parent Route Params
es404020
es404020

Posted on

How to Access Angular Parent Route Params

*Case Study *

Assume your app-routing.module.ts looks like this

Image description

*Problem Statement *

How do we access the accountNumber params from the children route.

*Possible Solution

Image description

This Works but it not the best solutions.

Best Solution

Update your app-routing.module.ts

Image description

paramsInheritanceStrategy: 'always' ==> This gives your access to parent params.Which make it easier to access parent params by doing

Image description

Thanks for reading you can support by Support link

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more