Image for post: Angular V2+ code documentation with Compodoc

Angular V2+ code documentation with Compodoc

NGCli is amazing but it still needs something more to be perfect. I was wondering if there is something about code documentation with Angular and I have found a couple of libraries very easily.


Compodoc is very easy to find on Google. I have tried it and I like it. You can install it globally with npm and start generating and covering documentation for your application. You can also visit the repository on Github and read its own documentation. It's simple to use and what it generates is very powerful:

  • Code documentation and coverage
  • UML and diagrams about Components, directives, variables, services and more...
  • See the number of components, services, routes and more...
  • You can show the source code


# Install compodoc with npmnpm install -g @compodoc/compodoc# Run compodoc in your project and serve itcompodoc src -s# If you are using NGClicompodoc -p src/tsconfig.json -s# For the most recent version of NGCli:compodoc -p src/ -s

This tool is highly recommended for all of these amazing features and for having good documentation always available for every developer.


Typedoc is another open source documentation tool for Typescript projects. It's very easy to use but Compodoc is much better for Angular applications.
Feel free to try this tool. Actually, I still prefer Compodoc.