Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find out what modules a component or service is dependent on?

I want to make my modules lazy loaded, and to do so I must be sure that no component or service from one module is dependent on another module's components or services. Is there any way to build a graph or another kind of diagram to check dependencies between components and services?

For now I only think about writing a piece of code that would parse all the components, modules and services, and then will check their dependencies.

like image 856
mmrzk Avatar asked Oct 27 '25 00:10

mmrzk


2 Answers

You can use Angular Augury, see docs here: https://augury.rangle.io/pages/guides/io-demo.html

And these are some of its features (Dependency graph and lazy loaded modules)

enter image description here

And this is the list of your modules and all their declaration/providers/imports..etc

enter image description here

like image 100
Nadhir Falta Avatar answered Oct 29 '25 13:10

Nadhir Falta


You can run ngd to generate a dependency graph report.

https://github.com/compodoc/ngd

like image 39
Reactgular Avatar answered Oct 29 '25 13:10

Reactgular



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!