Now open your terminal and run the below command to generate the documentation. This command will generate the documentation in a new directory as documentation in the project root path.
npm run compodoc
To see the documentation, use http-server or any other npm package to serve the server for the documentation directory. I'm using http-server in this method. To use that, you should first install it by npm install --global http-server.
Then, run the below command to serve the files.
http-server documentation/
Once the command runs successfully, open http://localhost:8080/ to see the documentation for your Angular app.
That's it, Yes!
Here are the screenshots of the documentation created by compodoc.
In the overview section, you can see the number of modules, routes, services, guards, and the structure of the application.
You can see the services, components declare, the module imported for each module.
Also, the respective components are grouped under its module. See the left-hand side.
Additionally, you can view the metadata of the component, methods, properties etc..
The source of the component also can be viewed under the source tab.
The source of the template also can be viewed under the template tab.