I am a junior developer and have been assigned to this team that works on a web application similar to Whatsapp but written in Angular. It has many modules, components and pipes which is frankly quite daunting. Are there any tips / direction to follow while exploring a codebase, specifically an angular codebase?
-
As a first advice i would say look for the module that is first bootstrapped, by default it's named app.module.ts then from there navigate to other pages and modules following the angular routing described in the RouterModule.forRoot or forChild – Simplicity's_Strength Apr 02 '21 at 08:24
-
You should ask the lead developer for guidance. – Silvermind Apr 02 '21 at 08:28
2 Answers
Well, you definitely want to stay inside of the src folder, but your components are mainly the frontend view of the application, guards can be your authentication guard, interceptors can be JWT tokens, error interceptors, etc. Models are self explanatory. And services is a big one, this is where all of your backend services will lay, for example authentication service this is where it'll be checking localstorage (if you use that) assigning functions for logging out, logging in etc. I would just read over the basis of Angular 8 (or whichever version your team is using)

- 70
- 8
The first thing I do for every Angular project I'm working on is checking out the app-routing.module.ts to see the available routes and to make yourself a picture of the scope of the application.
Furthermore, you can walk through every component (recommended to start at the root (/) component and read through the code so you understand the functionality of every module. There you can also dig down to the underlying controller which creates the api requests and so on.

- 36
- 5