I was not satisfied with this answer and all the tools out there seem to ignore anything "public" so I made a thing to help. See the gist [here.](https://gist.github.com/triadzack/a147084c9f57b89987d09b2bd3bb0d89) I think it could be useful to you but let me know in the comments of the gist if you think it could be better.
Caveats:
- It looks at Angular components and assumes if it is not used in the local html file (of the same name) then it is "unused".
- There are some edgecases accounted for.
- It ignores `HostListener` functions and all the `ng*` lifecycle hooks.
- It also ignores some types that pretty much always are "unused" in the local html like `EventEmitter`.
- It only looks at components with existing html files. It will not look at services or other file types.
I was not satisfied with this answer so I made a thing to help. See the gist [here.](https://gist.github.com/triadzack/a147084c9f57b89987d09b2bd3bb0d89) I think it could be useful to you but let me know in the comments of the gist if you think it could be better.
Caveats:
- It looks at Angular components and assumes if it is not used in the local html file (of the same name) then it is "unused".
- There are some edgecases accounted for.
- It ignores `HostListener` functions and all the `ng*` lifecycle hooks.
- It also ignores some types that pretty much always are "unused" in the local html like `EventEmitter`.
- It only looks at components with existing html files. It will not look at services or other file types.